![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Printing specified lines only | Mohit623 | Shell Programming and Scripting | 4 | 01-03-2008 05:55 AM |
| Suppress error message in unzip | skwyer | Shell Programming and Scripting | 5 | 09-26-2007 02:20 PM |
| Printing lines with specific awk NF | jehrome_rando | Shell Programming and Scripting | 1 | 03-13-2007 01:23 AM |
| Printing out whole lines in .ksh script | L_Smith | Shell Programming and Scripting | 2 | 07-18-2006 05:51 PM |
| question about printing number of lines in a file | a8111978 | UNIX for Dummies Questions & Answers | 5 | 09-17-2002 07:15 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Suppress last N lines printing
Hi,
I want to know different ways of suppressing printing of last N lines. Can anyone help? Thanks, Sree |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
This is pretty vague.. you'll have to be a lot more specific for anyone to give you a meaningful answer!
------ There's probably a nice short way to do this, but a short script like this would work: linesToSkip=10 b=`wc -l < yourFile` head -n `expr $b - $linesToSkip` yourFile Last edited by oombera; 11-12-2003 at 11:37 AM. |
||||
| Google The UNIX and Linux Forums |