From: Robert Klemme Date: 2007-09-08T00:30:42+09:00 Subject: Re: read a specific line from a file 2007/9/7, William James : > On Sep 7, 4:50 am, "Robert Klemme" wrote: > > 2007/9/7, Bulhac Mihai : > > > > > how can i read only a line from a txt file? > > > for example i want to read only line 3 > > > > sed -ne '3 p' your_file > > > > robert > > awk "3==NR" your_file When I think about it, this is probably more efficient for large files and low line numbers: head -3 your_file | tail -1 :-) robert