Re: head or tail

From: Taylor, David (DTaylor@WBMI.COM)
Date: Fri Apr 11 2003 - 15:49:24 EDT


You could do something like this:

tail -`expr $(cat $FILE | wc -l) -20` $FILE

However:

sed 1,20d

Is a little more straight forward ;-)

David

                -----Original Message-----
                From: Shawn Bierman [mailto:BiermanS@METHODISTHEALTH.ORG]
                Sent: Friday, April 11, 2003 1:42 PM
                To: aix-l@Princeton.EDU
                Subject: head or tail

                I think I've seen this here before but... if I want to remove the first 20 lines from a command output (first 20 lines are always the same) how would I do it with head/tail. I'm sure awk or sed could do it but I thought I saw a trick to do it with head/tail.

                -shawn

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:44 EDT