Issue
I know that I can run a local bash script on a remote host via ssh per this other question. But what about running a local awk script that receives a file as a parameter?
I've tried something like this but no luck:
ssh myuser@machine 'awk -s' < awk -f my_local_awk_script.awk "/remote/path/remote_file.txt"
Solution
Can this achieve what you expected :
ssh myuser@machine awk -s -f /dev/stdin /remote/path/remote_file.txt < my_local_awk_script.awk
Answered By - Philippe