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

Describe the usage and functionality of the command rm –r * in unix?

2 Answers  


How do I open a port?

0 Answers  


If JFS file system is 100% full how we can increase the file system ?

3 Answers  


distinguish between paging and swapping?

1 Answers   Infosys,


what is the cmd to display the last exit status in UNIX?

5 Answers   MEIT, Syntel,


How many unix commands are there?

0 Answers  


What is "type" command in unix?what is the functionality??

2 Answers  


Can you explain a little bit about command substitution?

0 Answers  


How do I use nslookup?

0 Answers  


What are reported commands?

0 Answers  


What is {} in find command?

0 Answers  


Give the command for finding the current date.

0 Answers  


Categories