Quote:
Originally Posted by mgarciagarcia1982
Hello,
how can I set the cat command to read specified lines of a text file,
like if I have a text file with 100 lines, who can I say cat only line 23 to 42?
|
Another non-elegant way would be:
Code:
head -n 42 your-file | tail -n 20
to get 20 lines before and including 42, i.e., 23-42.