sed -n '5,10p' file.txt

Category: Text Processing

sed -n '5,10p' file.txt

Print only lines 5 through 10

Prints only lines 5 through 10, suppressing all others. -n suppresses default printing; p means 'print these lines'.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.