How can I pass variables from awk to a shell command?

you are close. you have to concatenate the command line with awk variables:

awk '{system("wc "$1)}' myfile

Leave a Comment