Bash - select specific rows of a file (awk, sed)

26 Aug 2017

# put the code 

Example1 - print lines between 5 and 10:

awk 'NR>4 && NR<11' file.txt

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

Example2 - print from line 10 to last line:

awk 'NR>9' file.txt
sed -n '10,$p' file.txt
[ bash  awk  sed  ]