Grep from a starting line till the end of the file

Hi Folks,

I got to know from this forums on how to grep from a particular line say line 6

awk 'NR==6 {print;exit}'

But how do i grep from line 6 till the end of the file or command output.

Thanks,

awk 'NR>=6' file

(That's not really "grepping", it's just printing lines 6 onwards)

1 Like

sorry ya it is just printing from line 6 onwards. :slight_smile:

by sed

sed -n '6,$p' infile