For a file containing 20 lines, lines 6-10 can be printed using following command:
head -10 filename | tail -5
Can this exactly same thing be done without using 'head' and 'tail' commands ??
Please comment the link if similar question already exists.
sed '6,$!d;20q'
to avoid reading the whole input. – Stéphane Chazelas Aug 25 '14 at 12:49