![]() |
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 |
| command for selecting specific lines from a script | gardasgangadhar | UNIX for Dummies Questions & Answers | 1 | 05-13-2008 05:29 AM |
| merge based on common, awk help | jkl_jkl | Shell Programming and Scripting | 3 | 03-17-2008 07:13 AM |
| Help with selecting specific lines in a large file | tansha | UNIX for Dummies Questions & Answers | 2 | 02-06-2008 08:26 AM |
| how to take out common of two lines in a file | jam_ali49 | UNIX for Advanced & Expert Users | 6 | 11-23-2007 04:48 AM |
| Search file for pattern and grab some lines before pattern | frustrated1 | Shell Programming and Scripting | 2 | 12-22-2005 03:41 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
selecting only few lines from many based on a common pattern
Hi,
I have a file having some thousand records with the following sort of lines: Error: Failed to get order data Order: PO-BBBTGZE Error: No CLI Error: Failed to get order data Order: PO-SBDJUZA Order: PO-XBBIDEN Error: No CLI Error: Failed to get order data Order: PO-BBDJUTQ Order: PO-FBCSPHC Error: No CLI Error: Failed to get order data Order: PO-FLBVKYV Error: No CLI Error: Failed to get order data Order: PO-KBDASSI Order: PO-HBBGQCE Error: No CLI Error: Failed to get order data Order: PO-RBDDJKT Order: PO-RBDDJKM Error: No CLI Error: Failed to get order data Order: PO-EBDCFLJ I wish to only retrieve the lines marked red and none else. i.e. any line with the line after it starting in ERROR is not desired. Any Directions shall be highly appreciated. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|