LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to print a given line from a file on the standard output (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-print-a-given-line-from-a-file-on-the-standard-output-476861/)

Fond_of_Opensource 08-24-2006 02:25 AM

How to print a given line from a file on the standard output
 
How to print a given Line on standard output (Say print line No 20) from a file which contains 30 lines. Is there a single command in linux which can do this?

Tinkster 08-24-2006 02:45 AM

sed -n '20p' file


Cheers,
Tink


All times are GMT -5. The time now is 10:09 AM.