RE: Quick Help...Shell script...
Posted in 2000
Easiest I know of is: sed -n '100p' filename internally it's scanning the whole file, but I don't think you can avoid that. for a range: sed -n "100,200p" filename > -----Original Message----- > From: Prasad Mahale [SMTP:gs0528@hotmail.com] > Sent: Tuesday, September 05, 2000 1:30 PM > To: informix-list@iiug.org > Subject: Quick Help...Shell script... > > Hi All, > How can i get nth line (for example say 100th line) from a text file > directly? > I don't want to scan whole file for that using a loop. > Like TOP and TAIL command, is there anything to read a range of lines > in-between? > > Thanks in advance > Prasad > > > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > Share information about yourself, create your own public profile at > http://profiles.msn.com.