I must learn to read properly some day. Thanks.
On Tue, Mar 26, 2013 at 8:05 AM, Ejnar Z Rath <[email protected]> wrote: > head -n-<N> > > to print all but the last <N> lines. > > > -- > Ejnar Zacho Rath > Advisory Infrastructure IT Architect, GTS Strategic Outsourcing Delivery > Denmark > IBM Danmark ApS > Sivlandvænget 29, 2., DK-5260 Odense S, Denmark > > > > From: "McKown, John" <[email protected]> > To: [email protected], > Date: 2013/03/26 13:55 > Subject: command needed which will print all lines in a file, > except for the _last_ "n". > Sent by: Linux on 390 Port <[email protected]> > > > > OK. I know that I can use head to print the first "n" lines in a file > (head -n 20 file). I can use tail to print the last "n" lines in a file > (tail -n 20 file) , or start printing all lines in a file after line "n" > (tail -n +20 file). But I need to a way to print all the lines in a file, > except for the last "n". I.e. lines 1 through "n-1". Is there one that I'm > missing? Or do I need to whip up a fast Perl script myself? > > -- > John McKown > Systems Engineer IV > IT > > Administrative Services Group > > HealthMarkets(r) > > 9151 Boulevard 26 * N. Richland Hills * TX 76010 > (817) 255-3225 phone * > [email protected] * www.HealthMarkets.com > > Confidentiality Notice: This e-mail message may contain confidential or > proprietary information. If you are not the intended recipient, please > contact the sender by reply e-mail and destroy all copies of the original > message. HealthMarkets(r) is the brand name for products underwritten and > issued by the insurance subsidiaries of HealthMarkets, Inc. -The > Chesapeake Life Insurance Company(r), Mid-West National Life Insurance > Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM > > ---------------------------------------------------------------------- > For LINUX-390 subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO LINUX-390 or > visit > http://www.marist.edu/htbin/wlvindex?LINUX-390 > ---------------------------------------------------------------------- > For more information on Linux on System z, visit > http://wiki.linuxvm.org/ > > > > > Medmindre andet er angivet ovenfor: / Unless Otherwise Stated Above: > IBM Danmark ApS > Nymøllevej 91 > 2800 Kongens Lyngby, Danmark > CVR nr.: 65305216 > > ---------------------------------------------------------------------- > For LINUX-390 subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO LINUX-390 or > visit > http://www.marist.edu/htbin/wlvindex?LINUX-390 > ---------------------------------------------------------------------- > For more information on Linux on System z, visit > http://wiki.linuxvm.org/ > -- This is a test of the Emergency Broadcast System. If this had been an actual emergency, do you really think we'd stick around to tell you? Maranatha! <>< John McKown ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 ---------------------------------------------------------------------- For more information on Linux on System z, visit http://wiki.linuxvm.org/
