how to find the 51th record of a file containing 100 records
in unix.

Answers were Sorted based on User's Feedback



how to find the 51th record of a file containing 100 records in unix...

Answer / ruchi agarwal

head -n 51 filename |tail -1

Is This Answer Correct ?    45 Yes 4 No

how to find the 51th record of a file containing 100 records in unix...

Answer / sundar octavious

head -51 <filename> |tail -1

The above command will display the answer.

Is This Answer Correct ?    33 Yes 1 No

how to find the 51th record of a file containing 100 records in unix...

Answer / harsha

sed -n 51p <filename>

Is This Answer Correct ?    19 Yes 1 No

how to find the 51th record of a file containing 100 records in unix...

Answer / biswa

cat <filename>|head -51|tail -1

Is This Answer Correct ?    8 Yes 1 No

how to find the 51th record of a file containing 100 records in unix...

Answer / deepak

head -51 <filename> | tail -1

Is This Answer Correct ?    2 Yes 0 No

how to find the 51th record of a file containing 100 records in unix...

Answer / dinesh babu

awk '{if (NR==51) print$0}' filename

Is This Answer Correct ?    0 Yes 0 No

how to find the 51th record of a file containing 100 records in unix...

Answer / abani_mahana

head -51 | tail -1

Is This Answer Correct ?    0 Yes 0 No

how to find the 51th record of a file containing 100 records in unix...

Answer / raj

sed '51p' filename

Is This Answer Correct ?    0 Yes 1 No

how to find the 51th record of a file containing 100 records in unix...

Answer / dinesh kumar

awk 'NR=51 Printf{$0}' filename

Is This Answer Correct ?    0 Yes 2 No

how to find the 51th record of a file containing 100 records in unix...

Answer / supriya

head -51|tail -1 <filename>

Is This Answer Correct ?    0 Yes 4 No

Post New Answer

More Unix Commands Interview Questions

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

0 Answers  


How to display no of records in oracle using unix command?

0 Answers  


Who command in unix?

0 Answers  


what is the difference between relative path and absolute path?

7 Answers  


What does the metacharacter mean?

0 Answers  


Enumerate some of the most commonly used network commands in unix?

0 Answers  


Through which command will redirect output to bOth screen and files at the same time?

3 Answers  


what are the different hardwares available?

1 Answers  


What is the command to compare two files in unix?

0 Answers  


How do you list the files in an UNIX directory while also showing hidden files?

6 Answers  


What is the use of the tee command?

0 Answers  


How do you remove a crontab file?

6 Answers  


Categories