Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
i am having a text file named plantlog.j of v big size. file contains text format like
msg 1031 : Shuttle arrived
3: 1 65 3 4 3 0msg 1211 : Shuttle sent
3: 2 4 1 3So, i want to grep each and every msg of no 1031 with its next line text (3: 1 65 3 4 3 0)
please help me by providing any command or script to find it.
sanyog garg from reliance industries

If you want both lines:
sed -n -e '/1031/ {p;n;p; } plantlog.j
If you just want the line after 1031
sed -n -e '/1031/ {n;p; } plantlog.j

![]() |
Encrypt/ username and pas...
|
Max column count in AIX
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |