Is it possible for awk to read the program and the input from the standard input?
I would like to be able to pipe a file to the following function.
process_data () {
awk -f - <<EOF
{print}
EOF
}
Note: the actual program is longer, it can't be passed as a command line argument, and I'd rather not use temporary files.
Currently it doesn't output anything.
$ yes | head | process_data
$