Friday, December 3, 2010

Show certian line in document using command

If you have a large document and you want to see  only one line in documet and you know the line number
you can use this command

sed -n "linenumber p" file.txt

source :
http://www.linuxquestions.org/questions/linux-newbie-8/display-line-number-n-from-a-file-273780/

thanks

No comments:

Post a Comment