Re: Reading a particular line in a file

Forside
Vedhæftede filer:
Indlæg som e-mail
+ (text/plain)
Slet denne besked
Besvar denne besked
Skribent: Michael Havens
Dato:  
Til: plug-discuss
Emne: 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