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

Explain command to show the space allocation of files?

0 Answers  


What is a bash command?

0 Answers  


What is the first character of the output in ls l command?

0 Answers  


What is the basic difference between unix and windows operating systems?

43 Answers   Bopro, College School Exams Tests, CTS, IBM, IT-Kids, Priyadarshini, Sybian Technologies, Tolani Maritime,


Which command will you use to change the permissions on file?

7 Answers  






How to check whether some services are running in another server or not? Suppose i am currently in a server named A.I want to check whether some services are running in server B without logging into the server B.

3 Answers   Amazon, MBA, Syntel, TCS, Unisys,


Briefly, how do you install Oracle software on UNIX.

2 Answers  


How do you change your account's password?

6 Answers  


who to change the duplex setting of network interface in command line

1 Answers  


how will you login one server's shell prompt to an another server?

5 Answers   Cosmic Infotech, Perot Systems,


What is the difference between cat and more command?

0 Answers  


what is the functionality of kernel in unix architecture?

13 Answers   HCL,


Categories