![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | 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 |
| delete first 100 lines from a file | salaathi | SUN Solaris | 3 | 11-15-2007 12:01 AM |
| delete first 100 lines rather than zero out of file | thepurple | SUN Solaris | 7 | 11-14-2007 09:35 AM |
| delete the lines from file | sameersam | Shell Programming and Scripting | 2 | 04-03-2006 10:32 PM |
| Delete lines in a file | umal | Shell Programming and Scripting | 6 | 02-08-2006 09:08 AM |
| delete all lines in file | strok | UNIX for Dummies Questions & Answers | 6 | 03-11-2002 06:27 PM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
This is not memory-intensive, and will work.
Code:
cat filename | perl -ne 'push(@a, $_); print shift(@a, ) if $#a >=3 ;' |
|||
| Google UNIX.COM |
| Forum Sponsor | ||
|
|