![]() |
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 |
| pattern matching over more lines | trek | Shell Programming and Scripting | 3 | 04-22-2008 06:37 AM |
| Script to find file name for non matching pattern | sujoy101 | Shell Programming and Scripting | 5 | 03-31-2008 09:10 AM |
| Reading lines in a file matching a pattern | torenji | Shell Programming and Scripting | 4 | 10-25-2007 04:15 AM |
| Search file for pattern and grab some lines before pattern | frustrated1 | Shell Programming and Scripting | 2 | 12-22-2005 03:41 PM |
| getting file words as pattern matching | arunkumar_mca | High Level Programming | 5 | 05-31-2005 03:28 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Quote:
Code:
awk '/total/{c=11}c-->0{print;if(c==0){print "======"}}' file
|
|
||||
|
Quote:
Code:
awk '/total/{c=11}c>0{c--;print;if(c==0){print "======"}}' file
|
![]() |
| Bookmarks |
| Tags |
| linux, perl, perl shift, shift, shift perl |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|