10-15-2008
hi
try this
awk '$4 == 7 { printf "%s\n",$0; }' filename
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a huge file & I want to add a specific text in column. But I want to add this text from a specific line number to a specific line number & another text in to another range of line numbers.
To be more specific: lets say my file has 1000 lines & 4 Columns. I want to add text "Hello"... (2 Replies)
Discussion started by: Ezy
2 Replies
2. Shell Programming and Scripting
How to manipulate first column and reverse the line order in third and fourth column as follws?
For example i have a original file like this:
file1
0.00000000E+000 -1.17555359E-001 0.00000000E+000
2.00000000E-002 -1.17555359E-001 0.00000000E+000
... (1 Reply)
Discussion started by: Max Well
1 Replies
3. Shell Programming and Scripting
Hi,
I have a file that has data in it that says
00:01:48.233 1212
00:01:56.233 345
00:09:01.221 5678
00:12:23.321 93444
The file has more line than this but i just wanted to put in a snippet to ask how I would get the highest number with time stamp into another file. So from the above... (2 Replies)
Discussion started by: pat4519
2 Replies
4. UNIX for Dummies Questions & Answers
Hello Everyone.
I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below:
if ; then
if ; then
tail +$1 $3 | head -n $2
else
... (5 Replies)
Discussion started by: grc
5 Replies
5. Shell Programming and Scripting
cat test.nmea|awk 'NR%3!=0'
This deletes the 3rd line, or I can delete the fourth but I can't figure out how to delete the 3rd and 4th together. I'm looking for a quick way to make a GPS log half its size.
Also how do I pipe the output to another file?
Hope someone can help! (5 Replies)
Discussion started by: traveltrousers
5 Replies
6. Shell Programming and Scripting
Dears,
I need a script or command which can find the unique number from the second filed and against that number it adds the total of first field .
17215630 , 0
907043 ,1
201050 ,10
394149 ,4
1964 ,9
17215630, 0
907043 ,1
201050, 10
394149 ,4
1964 ,9
1234234, 55
23 ,100
33 ,67
... (2 Replies)
Discussion started by: shary
2 Replies
7. Shell Programming and Scripting
I am working on a script to convert bank data to a csv file. I have the format done - columns etc. The final piece of the puzzle is to change the second field (after the R) of every line to reflect its' line number in the file. I am stumped. I can use awk on each line but need help looping through... (9 Replies)
Discussion started by: Melah Gindi
9 Replies
8. Shell Programming and Scripting
Hi
I want to use awk to match where field 3 contains a number within string - then print the line and just the number as a new field.
The source file is pipe delimited and looks something like
1|net|ABC Letr1|1530|||
1|net|EXP_1040 ABC|1121|||
1|net|EXP_TG1224|1122|||
1|net|R_North|1123|||... (5 Replies)
Discussion started by: Mudshark
5 Replies
9. Shell Programming and Scripting
Hello,
I have a text file in the below format:
Source Destination State Lag Status
CQA02W2K12pl:D:\CAQA ... (10 Replies)
Discussion started by: pocodot
10 Replies
LEARN ABOUT DEBIAN
nntpsend.ctl
NNTPSEND.CTL(5) File Formats Manual NNTPSEND.CTL(5)
NAME
nntpsend.ctl - list of sites to feed via nntpsend
DESCRIPTION
The file /etc/news/nntpsend.ctl specifies the default list of sites to be fed by nntpsend(8).
Comments begin with a number sign (``#'') and continue through the end of the line. Blank lines and comments are ignored. All other lines
should consist of four fields separated by a colon.
The first field is the name of the site as specified in the newsfeeds(5) file.
The second field should be the hostname or IP address of the remote site.
The third field, if non-empty, specifies the default tail truncation size of site's batchfile. If this field is empty, no truncation is
performed. If this field is of the form ``maxsize-truncsize'' then it is passed to shrinkfile as ``-m maxsize -s truncsize'', otherwise is
of the form ``truncsize'' then it is passed as ``-s truncsize''.
The fourth field specifies some default flags passed to innxmit(8). The flag ``-a'' is always given to innxmit and need not appear hear.
If no ``-t timeout'' flag is given in this field and on the nntpsend command line, ``-t 180'' will be given to innxmit.
HISTORY
Written by Landon Curt Noll <chongo@toad.com> for InterNetNews. This is revision 1.7, dated 1996/09/13.
SEE ALSO
innxmit(8), newsfeeds(5), nntpsend(8), trunc(1).
NNTPSEND.CTL(5)