You may also skip an arbitrary number of lines at the beginning or the end of the file using head
or tail
programs.
For your concrete question,
tail input.txt -n+7 | program.awk
will do, provided your program.awk
file is executable. Otherwise, you may use
tail input.txt -n+7 | awk -f program.awk
This way, you will spare a comparison for each line and you don't need to change the logic of your AWK code.
tail
will start streaming text starting at the seventh line, skipping the six first lines.
This will not be a huge deal in performance, especially if text process is simple thanks to caching. However, for long files and repeated use in cloud environment may save some cost.