![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| print a line containing word in a column using grep | useless79 | Shell Programming and Scripting | 2 | 11-23-2007 12:32 AM |
| grep the line only if next line matches | pbsrinivas | Shell Programming and Scripting | 11 | 07-10-2007 05:51 AM |
| Printing the following line that matches an string | jgarcia | Shell Programming and Scripting | 7 | 05-09-2007 10:31 PM |
| Can a shell script pull the first word (or nth word) off each line of a text file? | tricky | Shell Programming and Scripting | 5 | 08-17-2006 03:29 AM |
| Select matches between line number and end of file? | Jerrad | Shell Programming and Scripting | 4 | 05-24-2006 04:50 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi
i need a help for making a script whch can print next line if it matches a particular word like file1 have ename Mohan eid 2008 ename Shyam eid 345 if scipt got Mohan it will print next line (eid 2008) pls help me ....... |
| Forum Sponsor | ||
|
|
|
|||
|
Hi
Thanks for ur reply but have little bit doubt if i have file ename Mohan ename2 Mohan eid 2008 ename Shyam eid 345 and i will give sed -n -e '/Mohan/ {n; p;}' filename it wiil give output ename2 Mohan here when command finds Mohan it is prinitng next line ename2 Mohan but it should also print eid 2008 as file is also having line ename2 Mohan |
|||
| Google UNIX.COM |