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.

Answer Posted / meenu

if u want first 7 rows then
head -n7 <filename>
but if you want only 7th row then
awk 'nr==7 {print}' <fileanme>
or
tail -n4 <filename>|head -n1

Is This Answer Correct ?    0 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain command to display different lines that are found when compare two files?

678


How do I search a whole word in vim?

694


What is the command to find maximum memory taking process on the server?

674


Using unix command how to display no of records in oracle?

613


How can you see the command line history?

588






What is command statement?

543


What is time_t?

589


What are the differences among a system call, a library function, and a unix command?

571


How do I search for a file in unix command?

551


How to use grep command to list find the records of a file containing 10 different strings?

650


What command will change your prompt to myprompt?

709


What is $0 bash?

653


Which command will print your home directory on screen?

548


Give the command for finding the current date.

583


What is the size of time_t?

655