![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| To find the time difference between two lines of the same log file | satyakam | Shell Programming and Scripting | 2 | 04-30-2008 10:46 AM |
| How to find number of lines in a file | somesh_p | Shell Programming and Scripting | 2 | 12-19-2007 09:15 PM |
| find string in .jar file | rakeshou | UNIX for Dummies Questions & Answers | 8 | 07-06-2007 03:42 PM |
| Find lines greater than 80 characters in a file | mrgubbala | Shell Programming and Scripting | 8 | 03-11-2007 12:51 AM |
| find and copy string in a file | vascobrito | UNIX for Advanced & Expert Users | 10 | 03-03-2004 02:14 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
find string, then get the next 3 lines in a file
Hi all. HPUX - /bin/sh (posix)
I am parsing a 3 field flat file, space deliminted example data.file acct dining mem open 0 50 dep 50 0 close 255 0 acct plus mem open 100 100 dep 50 0 close 323 0 I would like to find strings, then write the next 3 lines out to another file exec < data.file while read NAME NAME2 NAME3 do if [ "$NAME2" = "dining" ] then (how to I get the very next 3 lines?) |
| Bookmarks |
| Tags |
| linux, linux commands |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|