Human languages are sometimes frustratingly vague. You thought you stated your desire accurately, but there are four solutions with different results that all do what you stated you want.
If you want to keep the line containing the matching pattern, but omit the three next lines, use
Code:
awk ' { print }
/pattern/ { getline ; getline ; getline ; next }
' input-file > output-file
which uses getline three times like Catkin said. The three lines are completely ignored. In particular, the script does not check if the pattern matches in the deleted lines. Therefore, if you have the pattern on four consecutive lines, only three lines are omitted.
If you want to the three lines including the one containing the pattern, use
Code:
awk '/pattern/ { getline ; getline ; getline ; next }
{ print }
' input-file > output-file
In this case, if you have three consecutive lines containing the pattern, they are all omitted, but the immediately following line not containing the pattern will be included.
If you want to check if the omitted lines trigger further omissions, use Grail's approach:
Code:
awk '/pattern/ { nNR = NR + 3 }
NR >= nNR { print }
' input-file > output-file
If you want the omission to omit the three lines that follow it, but not the triggering line itself (unless that line is omitted due to a prior match), use
Code:
awk ' NR >= nNR { print }
/pattern/ { nNR = NR + 4 }
' input-file > output-file
I recommend you test the above with different types of input, not just the one you expect to receive, and pick the one that matches your needs.