![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| reading text file line by line | MizzGail | Shell Programming and Scripting | 6 | 04-14-2008 03:58 AM |
| Line by line file reading... and more! | ProFiction | Shell Programming and Scripting | 6 | 07-26-2007 08:32 AM |
| reading a line into a variable in unix | lmadhuri | UNIX for Dummies Questions & Answers | 1 | 02-07-2007 07:04 AM |
| Reading line by line from a file | tej.buch | Shell Programming and Scripting | 2 | 01-22-2006 11:50 PM |
| Reading line by line from file. | akpopa | UNIX for Dummies Questions & Answers | 4 | 08-30-2001 07:20 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Can any u pls tell me :-
I want to read a particular line from a file, say line no. 10. This can be done by using awk..but that method I think, is inefficient. Is there any direct command for this? Thanks
__________________
Yeheya Ansari Software Engineer |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Personally, I would use:
sed -n 10p filename |
|
#3
|
|||
|
|||
|
Thanks For Ur Reply. I will try it.
What I use today is sed -n "10s/.*/&/p" filename But ur reply looks really goodone for me.
__________________
Yeheya Ansari Software Engineer |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|