i am having a text file like below
rama
surya
pandu
latha
singh
raja
i want to get the new file from 3 to 5
i.e
pandu
latha
singh
please help
i am having a text file like below
rama
surya
pandu
latha
singh
raja
i want to get the new file from 3 to 5
i.e
pandu
latha
singh
please help
$ awk 'FNR>=3 && FNR<=5' infile > outfile
$ sed -n '3,5p' infile > outfile
$ head -n 5 infile | tail -n 3 >outfile
---------- Post updated at 02:11 PM ---------- Previous update was at 02:03 PM ----------
$ perl -ne 'print if 3..5' infile >outfile