i can execute echo from within awk like so:
but if i want to execute another shell script
like so:
it doesnt work.
at least i found that it is not a path related issue, since
any ideas how i can make awk execute my ~/bin/doit ?
Code:
echo asdf jkl asdf \
| awk ' /jkl/ { sub(/jkl/,echo "X(&)") } {print}'
asdf X(jkl) asdf
Code:
cat ~/bin/doit #!/bin/bash echo -n KKK
Code:
echo asdf jkl asdf \
| awk ' /jkl/ { sub(/jkl/,doit) } {print}'
asdf asdf
at least i found that it is not a path related issue, since
Code:
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
Comment