The way to run a shell command with awk variables by concatenation:
message="foobar"
cmd="echo \047"message"\047 | cut -c 33"
if ( (cmd | getline m) > 0 ) { print m }
else { print "Failed ..." | "cat>&2"; exit 1}
close(cmd)
Thanks Ed Morton, my first attempt was:
message="foobar"
"echo "message" | cut -c 33" | getline m
print m