This can be done using 'sed' command : # Here 'p' to print and '-n' to not print each line sed -n 10,20p input.txt > output.txt