if we create a file, in that 10 rows(means 1,2,....9,10
like). i want 7 row exactly, which command use in unix?
plz send this question.
Answers were Sorted based on User's Feedback
Answer / thomas k
please try this. it will work.
head -7 <filename> | tail -1
| Is This Answer Correct ? | 42 Yes | 8 No |
Answer / srinu gadipudi
Just try this command
awk 'NR==7{print}' fiename
| Is This Answer Correct ? | 20 Yes | 3 No |
Answer / kantha
Hi, If you want to display 7th line from the file, simple
way is,
$head -7 <filename>| tail -1
Thanks
Kantha
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / isha
Put the command in Present working dir
head -7 <filename>
| Is This Answer Correct ? | 16 Yes | 10 No |
Answer / deshdeep saxena
awk 'NR==7{print}' filename will give you the seventh line
as output
awk 'NR<=7[print]' filename will give you from 1st line to
the seventh line :-)
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / murthy
Hi,
Try with the below command
sed -n '7p' <file name>
| Is This Answer Correct ? | 1 Yes | 0 No |
What is an Environment Variable?
the difference between a soft link and a hard link?
What is the general format of unix command syntax?
What is the difference between udp and tcp?
What is difference between grep and find command in unix?
What is Unix, and how does it differ from other operating systems?
when we installing aix os the ssh installed default?
What is the unix command to confirm a remote host is alive or not?
what are the differences between CUI and GUI interfaces?
52 Answers College School Exams Tests, HCL, HP, IBM, IBMR, NIIT, Talco, Wipro,
what is the difference between "cron" command and "at" command?
What is the syntax of grep command and what is its use?
How to setup Disk space as well as memory in solaris10?