Wednesday, November 19, 2014

cat few lines from file from terminal in linux

If you want to get 50 lines after line 7500 then you can get it by below command

sed -n '7500,+50p'  filename

So here 7500 is the line from where i want to get lines
and 50 is the number of lines which i like to read

No comments:

Post a Comment

Contact Me for any help regarding rails/nodejs/php/mysql


Email *

Message *