From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Walberg Subject: Re: To extract a particular line(given by line number) from a file Date: Fri, 28 Mar 2003 13:15:15 -0600 Sender: linux-admin-owner@vger.kernel.org Message-ID: <20030328131515.C9113@mindspring.com> References: <2DE78F33FFE0D3118C0200508B94F9CA19420E8C@uswaumsx08medge.med.ge.com> Reply-To: Tim Walberg Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="f+W+jCU1fRNres8c" Return-path: Content-Disposition: inline In-Reply-To: <2DE78F33FFE0D3118C0200508B94F9CA19420E8C@uswaumsx08medge.med.ge.com> from Sadanapalli, Pradeep Kumar (MED, TCS) on 03/28/2003 12:35 List-Id: To: "Sadanapalli, Pradeep Kumar (MED, TCS)" Cc: linux-admin@vger.kernel.org --f+W+jCU1fRNres8c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable tail +5 somefile | head -1 or cat -n somefile | grep ' *5 ' or sed -ne 5p somefile or =2E.. On 03/28/2003 12:35 -0600, Sadanapalli, Pradeep Kumar (MED, TCS) wrote: >> Hi Friends, >> I am running RedHat Linux 8.0. I want to do the following . >>=09 >> I have a file with several lines of data in it. I want to extract a line >> I want from the file >> and display the whole line of data. 'grep' searches only for patterns,as >> I believe. I don't want to search for patterns.=20 >> I just directly want to extract the data by line numbers.For example, I >> want to get the data in line number 5. >>=09 >> How can I do this? Is there any command to do this? Please help me. I >> hope I am clear. >>=09 >> Thanks, >> Pradeep >> - >> To unsubscribe from this list: send the line "unsubscribe linux-admin" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html End of included message --=20 +--------------------------+------------------------------+ | Tim Walberg | twalberg@mindspring.com | | 830 Carriage Dr. | www.mindspring.com/~twalberg | | Algonquin, IL 60102 | | +--------------------------+------------------------------+ --f+W+jCU1fRNres8c Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: PGP 6.5.8 iQA/AwUBPoSfQMPlnI9tqyVmEQIihwCgmgOOS1E8T5hjob8VgGC73/NEhcsAoM1W 7rZ8oFM7vJ8+6hKfsffvFTZB =7fUh -----END PGP SIGNATURE----- --f+W+jCU1fRNres8c--