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.
Grep command
Name: nimi Date: July 10, 2007 at 20:57:23 Pacific OS: N/A CPU/Ram: N/A Product: N/A
Comment:
Hi
SITE MCC MNC LAC CI ELEMENT VALUE --- 11 502 12 4021 (0FB5h) 14336 (3800h) 0 11 502 12 4021 (0FB5h) 14337 (3801h) 0 11 502 12 4021 (0FB5h) 14338 (3802h) 0
How to grep the 0 value from the file. This 0 value is actually the last column after the Element Value header.
I used grep "ELEMENT VALUE" abc.log but how do i go to the next row.
Name: ghostdog Date: July 11, 2007 at 00:39:43 Pacific
Reply:
[code] awk ' NR>1{ print $NF } ' "file" [/code]
0
Response Number 2
Name: nimi Date: July 11, 2007 at 00:58:38 Pacific
Reply:
Thanks, that didnt really work.
How to awk/script this:- Extract column 8 from row = 48 of file.txt and store in variable.
11 502 12 4021 (0FB5h) 14336 (3800h) 0
Nimi
0
Response Number 3
Name: nimi Date: July 11, 2007 at 00:59:23 Pacific
Reply:
and space delimited
Nimi
0
Response Number 4
Name: ghostdog Date: July 11, 2007 at 06:51:47 Pacific
Reply:
why it did not work? show what you have done. to get row 48, use NR==48. To get column 8 , use $8. If you are sure that the "0" is always at last field, then you can use $NF.
0
Response Number 5
Name: Nirmala Date: July 11, 2007 at 18:25:31 Pacific
Summary: I am only fairly new to unix, so i have a question about grep.... i use the grep command at work to search for particular records. i use the grep command as "grep <criteria> <filename>". i know...
Summary: Hi Suppose a file F1 conatins following entries ABCD0B ABCD0Bs ABCD0B.ksh I would like to grep the word that contains only '0B' as last 2 charcaters. When I tried grep command : grep '0B' F1 it resu...
Summary: Hi! I have the text : ...HRD 20050905 820 N Final technical 820HRD If I want to remove only the line with "...HRD". Please some one know how and which the command on shell script to remove t...