![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Strip one line from 2 blank lines in a file | tipsy | Shell Programming and Scripting | 6 | 06-23-2008 05:14 AM |
| how to read a file till it encounters a blank line | adityam | UNIX for Dummies Questions & Answers | 1 | 11-25-2007 10:26 PM |
| how to read a file till it encounters a blank line | adityam | Shell Programming and Scripting | 1 | 11-25-2007 10:15 PM |
| how to read a file till it encounters a blank line | adityam | Post Here to Contact Site Administrators and Moderators | 0 | 11-25-2007 09:51 PM |
| why read line skips some lines... | bluemoon1 | Shell Programming and Scripting | 8 | 10-07-2007 12:55 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Read lines till a blank line is encountered
Hi,
I have reached at a specified offset from the start of file. My requirement is that I want to read only those lines, which have the string READ / ALTER / UPDATE. As soon as, none of these literals are found in the subsequent line, I want to stop reading. Is there any feature of grep which can help me do this? I saw one post in which someone has suggested using sed command. I could not follow it. Please suggest. tail -n $remPart filename.txt | head -n 100 | ............ The part in red is what I want. This should ideally be the terminating condition.. TIA Saurabh |
| Forum Sponsor | ||
|
|