Re: Reading a particular line in a file

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Michael Havens
Date:  
To: plug-discuss
Subject: Re: Reading a particular line in a file


grep [options] PATTERN [FILE...]
--
<:-)Mike(-:>

On Tuesday 08 June 2004 08:41, JD Austin wrote:
> Quoting Ben Coffman <>:
> > Is there a command line argument that lets you grab a particular line
> > from from a text file in Linux or Unix?
> >
> > Thanks,
> >
> > Ben
>
> You can use head/tail to do that.
> Say you want line 4:
> head --lines=4 filename | tail --lines=1
>
> JD







This message has been scanned for viruses by the VEI Internet
Automatic Email Spam and Virus Scanner, and is believed to be free of spam or viruses.
Please report spam to . If you would like 98.9 % spam blocked from your
E-mail then go to VEI Internet for details. Anti-spam/Anti-virus is FREE with every account.


http://www.vei.net/

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss