to list a particular line in the file

Answer Posted / jam

To print a specific line without using a string.

sed -n '1p' <filename>

Where 1 is teh line number

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to sort the content of the file based on numeric values

1238


What is command substitution?

615


Why is shebang used?

587


Which command will print your home directory on screen?

536


What is nr in awk command?

591






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

635


What is updatedb?

576


What does grep v grep do?

542


What is the difference between grep and grep?

559


What are reported commands?

556


What is ‘ps’ command for?

606


What are the general commands in using unix os for a beginner?

573


Name the unix command to find how many days the server has been up.

590


Differentiate cmp command from diff command.

578


Explain ‘system calls’ with respect to unix commands?

592