How can I pass variables from awk to a shell command? April 1, 2023 by Tarik you are close. you have to concatenate the command line with awk variables: awk '{system("wc "$1)}' myfile