rhnaeco
Technical User
- Aug 11, 2005
- 45
Hi,
I have a data file like this ($1 being the line number)
32....
33,8,8,8,8,8,8,8,8,8,8,8,8,8,8,245,230,120....
34,8,8,8,8,8,8,8,8,8,8,8,8,8,8,210,90,45....
35,200,200,200,200,200,200,200,200,105,214....
36....
what i want is for awk to:
if ($2 == "200") print next line only.
i have several of these '200' lines and want a file with just the lines that have suceeded each '200' line
i tried:
if ($2=="200") getline
print
but as you probably know, this printed every line after rather than just the one
hope you can help
rhnaceo
I have a data file like this ($1 being the line number)
32....
33,8,8,8,8,8,8,8,8,8,8,8,8,8,8,245,230,120....
34,8,8,8,8,8,8,8,8,8,8,8,8,8,8,210,90,45....
35,200,200,200,200,200,200,200,200,105,214....
36....
what i want is for awk to:
if ($2 == "200") print next line only.
i have several of these '200' lines and want a file with just the lines that have suceeded each '200' line
i tried:
if ($2=="200") getline
but as you probably know, this printed every line after rather than just the one
hope you can help
rhnaceo