system(cmd-line) Execute the command cmd-line, and return the exit status. (This may not be available on non-POSIX systems.)
echo asdf jkl asdf \ | awk ' /jkl/ { sub(/jkl/,echo "X(&)") } {print}' asdf X(jkl) asdf
cat ~/bin/doit #!/bin/bash echo -n KKK
echo asdf jkl asdf \ | awk ' /jkl/ { sub(/jkl/,doit) } {print}' asdf asdf
echo asdf jkl asdf \ | awk ' /jkl/ { sub(/jkl/,echo "("ENVIRON["PATH"]")") } {print}' asdf (/home/peter/bin:/opt/bin:/bin:/sbin:/usr/bin:/usr/sbin) asdf
Leave a comment: