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: JD Austin
Dato:  
Til: plug-discuss
Emne: Re: Reading a particular line in a file
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
--
JD Austin
Twin Geckos Technology Services LLC
Internet Hosting and Consulting
email:
http://www.twingeckos.com
phone/fax: 480.344.2640





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