简单function add1(){ result=`expr $1 + 1` echo $result}export -f add1awk 'BEGIN{p=3;"add1 "p|getline result;print result }'