Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Oct 2001 00:35:41 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        "Pietralla, Siegfried P" <siegfried.pietralla@eds.com>
Cc:        "'BSD Freak'" <bsd-freak@mbox.com.au>, FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Outputing a specific line number to standard output
Message-ID:  <20011009003541.A91559@dan.emsphone.com>
In-Reply-To: <16649A8D5C73D51183B80008C728EEB7CC09E6@AUSYM103>
References:  <16649A8D5C73D51183B80008C728EEB7CC09E6@AUSYM103>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Oct 09), Pietralla, Siegfried P said:
> hi there,
> 
> two simple ways:
> 
> using awk:
> 
> $ awk 'NR==54{print;exit}' myfile.txt
> 
> using head and tail:
> 
> $ tail +54 myfile.txt | head -1

Don't forget sed:

sed -n -e '54p' myfile.txt

-- 
	Dan Nelson
	dnelson@allantgroup.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011009003541.A91559>