By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,640 Members | 1,101 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,640 IT Pros & Developers. It's quick & easy.

Unix command: Display excerpt of rows from line number n to n+10

P: 1
Hi All,

I would like to know the unix command to display excerpt of rows from line number n to n+10 of a given file.

ex: display rows from 35624612 to 35624615 of a file.

thanks in advance
Oct 3 '07 #1
Share this Question
Share on Google+
2 Replies

ruskalym
P: 65
Hi!

Try something like :
Expand|Select|Wrap|Line Numbers
  1. head -35624615 filename | tail -4
Oct 3 '07 #2

radoulov
P: 34
[...]
ex: display rows from 35624612 to 35624615 of a file.
Expand|Select|Wrap|Line Numbers
  1. sed -n 35624612,35624615p filename
Oct 3 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.