From owner-freebsd-questions Mon Oct 8 22:35:51 2001 Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 6019837B405 for ; Mon, 8 Oct 2001 22:35:48 -0700 (PDT) Received: (from dan@localhost) by dan.emsphone.com (8.11.6/8.11.6) id f995Zgt94524; Tue, 9 Oct 2001 00:35:42 -0500 (CDT) (envelope-from dan) Date: Tue, 9 Oct 2001 00:35:41 -0500 From: Dan Nelson To: "Pietralla, Siegfried P" Cc: "'BSD Freak'" , FreeBSD Questions Subject: Re: Outputing a specific line number to standard output Message-ID: <20011009003541.A91559@dan.emsphone.com> References: <16649A8D5C73D51183B80008C728EEB7CC09E6@AUSYM103> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <16649A8D5C73D51183B80008C728EEB7CC09E6@AUSYM103> User-Agent: Mutt/1.3.22.1i X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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