![]() |
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 |
| grab next consecutive line or lines | wisher115 | Shell Programming and Scripting | 1 | 12-07-2006 08:01 AM |
| Cutting the top two lines, and also charachters below. | jalge2 | UNIX for Dummies Questions & Answers | 5 | 08-02-2005 02:59 PM |
| Appending Consecutive lines | pondlife | Shell Programming and Scripting | 8 | 08-13-2004 05:36 AM |
| Cutting n consecutive lines from a file... | Vishnu | UNIX for Dummies Questions & Answers | 2 | 10-18-2002 10:49 AM |
| Cutting lines out using sed I presume. | cfoxwell | UNIX for Dummies Questions & Answers | 5 | 01-08-2002 12:13 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Code:
awk '/pattern/{n=5;next}n{print;n--}' file
|
| Sponsored Links | ||
|
|