Posted By

noah on 07/15/08


Tagged

number debug code count text read line document debugging tips cat tail todo


Versions (?)

Dump a file to the terminal, starting at some line number


 / Published in: Bash
 

tail -n+99 foo.txt will read everything from foo.txt, starting with line 99. Pipe that into more and you just look at the few line(s) you really need.

To narrow this so it only prints the interesting lines (and not everything after those lines), see the nice solutions from deepsoul, below.

  1. tail -n+99 foo.txt | more

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: deepsoul on August 15, 2009

Regarding the todo: is this what you mean:

tail -n+99 foo.txt | head -20 | more

Or perhaps:

sed -n 99,118p foo.txt | more

Both print lines 99 to 118.

You need to login to post a comment.