linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ashish V. Orpe" <avorpe@che.iitb.ac.in>
To: "Sadanapalli, Pradeep Kumar (MED, TCS)" <Pradeep.Sadanapalli@med.ge.com>
Cc: linux-admin@vger.kernel.org
Subject: Re: To extract a particular line(given by line number)  from a file
Date: Sat, 29 Mar 2003 00:56:31 +0530	[thread overview]
Message-ID: <3E84A1E7.934B6FA5@che.iitb.ac.in> (raw)
In-Reply-To: 2DE78F33FFE0D3118C0200508B94F9CA19420E8C@uswaumsx08medge.med.ge.com


awk 'NR == 5 {print $0}'  somefile     :  this will extract the entire
fifth line

awk 'NR == 3, NR == 5 {print $0}'  somefile     :  this will extract the
entire lines 3 to 5

awk 'NR == 3, NR == 5 {print $1,$2}'  somefile     :  this will extract
the first and the second field from

lines 3 to 5



  parent reply	other threads:[~2003-03-28 19:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-28 18:35 To extract a particular line(given by line number) from a file Sadanapalli, Pradeep Kumar (MED, TCS)
2003-03-28 19:15 ` Tim Walberg
2003-03-28 19:26 ` Ashish V. Orpe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-03-28 19:20 jbrown105

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3E84A1E7.934B6FA5@che.iitb.ac.in \
    --to=avorpe@che.iitb.ac.in \
    --cc=Pradeep.Sadanapalli@med.ge.com \
    --cc=linux-admin@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).