Grep pattern after specific line number in a file

Hi guys,

I am running a while loop in a script ro read a file line by line.

Now I want to run a grep only on the lines below the line I am that is being read by the while loop.

Eg:

If my while loop is on line 4 of the file, the grep only runs below line 4 and does not include line 1,2 and 3.

How is that achievable ?

Regards.

Do you need to read the remainder of the file line by line, or do you just want to grep the remainder of the file being read by your while read loop?

I want to cat the remaining of the file.

Your description can be interpreted several ways. The output from cat and grep don't usually match. Please show us:

  1. the code you have so far (in CODE tags),
  2. a representative sample input file (in CODE tags), and
  3. the output file (or files) that you want to produce (in CODE tags).