![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum 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 |
| command for selecting specific lines from a script | gardasgangadhar | UNIX for Dummies Questions & Answers | 1 | 05-13-2008 02:29 AM |
| merge based on common, awk help | jkl_jkl | Shell Programming and Scripting | 3 | 03-17-2008 03:13 AM |
| Help with selecting specific lines in a large file | tansha | UNIX for Dummies Questions & Answers | 2 | 02-06-2008 04:26 AM |
| how to take out common of two lines in a file | jam_ali49 | UNIX for Advanced & Expert Users | 6 | 11-23-2007 12:48 AM |
| Search file for pattern and grab some lines before pattern | frustrated1 | Shell Programming and Scripting | 2 | 12-22-2005 11:41 AM |
|
|
Submit Tools | LinkBack | Thread Tools | 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. |
| Forum Sponsor | ||
|
|