Subject: | |
From: | |
Reply To: | COLE,GLENN (Non-HP-SantaClara,ex2) |
Date: | Wed, 10 Jan 2001 14:48:56 -0800 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Tony Newton writes:
> I can't remember for the life of me how to print an entire file minus the
> last 'x' lines on UX 10.20. I played with tail for awhile but that didn't
> get me anywhere. Any suggestions.
Incidentally, I just stumbled on what Tony may have been thinking.
It turns out that 'tail' also accepts the syntax
tail +2 filename
vs. the more common
tail -2 filename
The latter case displays the last two lines of filename,
while the former displays filename *beginning with* line 2
(counting from 1).
However, 'head' does not support this syntax.
Thus, while it's easy to "print an entire file minus the FIRST 'x' lines,"
it's not so easy to print minus the LAST 'x' lines.
Learn something new every day....
--Glenn
|
|
|