I\'d like to execute an gawk script with --re-interval using a shebang. The \"naive\" approach of
#!/usr/bin/gawk --re-interval -f
... awk scri
For a portable solution, use awk rather than gawk, invoke the standard BOURNE shell (/bin/sh) with your shebang, and invoke awk directly, passing the program on the command line as a here document rather than via stdin:
#!/bin/sh
gawk --re-interval <<
Note: no -f argument to awk. That leaves stdin available for awk to read input from. Assuming you have gawk installed and on your PATH, that achieves everything I think you were trying to do with your original example (assuming you wanted the file content to be the awk script and not the input, which I think your shebang approach would have treated it as).