I thought he wanted to find some text in the file. (grep is about the limit of my knowldge) :-)Mike(-: ----- Original Message ----- From: JD Austin Sent: 6/8/2004 12:10:48 PM To: plug-discuss@lists.plug.phoenix.az.us Subject: Re: Reading a particular line in a file Quoting Michael Havens : > > > grep [options] PATTERN [FILE...] > -- > <:-)Mike(-:> That will give you every line that matches the pattern in the file. Though if there is only one line with the pattern then it it would get a particular line. JD > > 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 email: jd@twingeckos.com http://www.twingeckos.com phone/fax: 480.344.2640 --------------------------------------------------- PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us To subscribe, unsubscribe, or to change you mail settings: http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss 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 spamtrap@vei.net. 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/ mailtospamtrap@vei.net --------------------------------------------------- PLUG-discuss mailing list - PLUG-discuss@lists.plug.phoenix.az.us To subscribe, unsubscribe, or to change you mail settings: http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss