Here are the commands to print part of file based on their line numbers with sed/awk.
- With sed
$ sed -n '4,10p' input.txt
Above command will prints from line 4 to 10.
- With awk
$ awk 'NR==4,NR==10' input.txt
Above awk expression also prints form line 4 to 10.
-Sany
Advertisements