Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Line Extraction from Script
Name: pmas Date: July 16, 2003 at 11:35:58 Pacific OS: Unix CPU/Ram: P3/256
Name: LANkrypt0 Date: July 16, 2003 at 11:56:19 Pacific
Reply:
If I am reading this correctly, you just need lines containing the word -DATA-
Why not use: grep "-DATA-" filename
0
Response Number 2
Name: pmas Date: July 16, 2003 at 12:25:07 Pacific
Reply:
It's not like that..
I had written -DATA- to indecate that data I am looking for comes their, that is actually a numaric value. This value comes after line containing COUNT .. sample data file looks like as follows.. //........ No. of lines of code I have done and other documents COUNT 100 No. of files reviewed by me COUNT 4 Errors found while reviewing COUNT 7 ...... .... Here I want to extract 100 4 7
0
Response Number 3
Name: LANkrypt0 Date: July 16, 2003 at 13:29:04 Pacific
Reply:
grep -A1 COUNT filename | grep -v COUNT
0
Response Number 4
Name: pmas Date: July 16, 2003 at 14:23:13 Pacific
Summary: Hello all, Is it possible to extract from a tar file to the other directory ? If possible please tell me the command I have to use. Thanks in advance for reply. Titas ...
Summary: So, each line in your control file specifies a block of lines to extract from your data file? cat infile #ABC# line 1 line 2 line 3 #DEF# line 4 line 5 line 6 line 7 #GHI# line 8 #JKL# line 9 line 10 ...
Summary: A unix document allows you to redirect standard input from the key board to lines in your shell script. You have to use the I/O redirection operator followed by an arbirary delimiter word. The inpu...