Hello everybody,
I would like to ask you, how to print first and last row from input (not file).
Hi, there
I have a file with tab and space as field separator. I need to assign values to variables then work with them, line by line. The code I wrote only works when each line has only one word.
Hello all, I am working on a python script and this is what i have
Code:
from sys import argv
script, filename = argv
print "We're going to erase %r " % filename
print "If you don't want that, hit Ctrl -C (^C)."
print "If you do want that, hit RETURN."
raw_input("?")
print "Opening the file..."
target = open(filename, 'w')
print "Tr
Hello Friends,
I have a CDR file and i need to print out 2 columns with their field position which matches to some constant values,
a part of input file
Code:
CZ=1|CZA=1|DIAL=415483420001|EE=13|ESF=1|ET=[16/04/2012][10:44:46:435]|FF=0|9|MNC=99|MNP=9041|MTC=0|NID=2|NOA=international|ON=1|
Code:
OutPut
3,DIAL=415483420001|13,NOA=international
i need to print out the colums wh
I'm using sh on hp-ux and want to find / print a line that matches 132.101- and the next line, too. grep -A isn't supported on hp-ux, so I'm trying awk and sed.
The code below works but only prints the first occurence.
Within AWK, how do you display a field of NR?
Hello,
I'm a bit stumped, for some reason when using AWK 'print' is not printing the entire date/line.
this may be basic thing for everyone here, but i cant push awk to print the variable user input which is INS, please help.
code:
Code:
INS=$1
printf '\n'
symdg list | grep $INS-clone | awk -v i=$INS '{ID=substr($4,9,4)}{print "Device Group: "$1,"at Array "ID,i}'
output:
Code:
$ ./test.sh patty
awk: syntax error near line 1
awk: bailing out near line 1
Given:
Code:
1,2,whatever,a,940,sot
how can i print from one particular field to the end of line?
Code:
awk -F"," '{print $2 - endofline}'
the delimiter just happens to be a comma "," in this case. in other cases, it could be hypens:
Code:
1---2---whatever---a---940---sot