I'm trying to find what sort of value in ${RESULT} as used in this script;
#!/bin/ksh
...
echo ${RESULT}|awk '{if ($0 ~ /RUNNING mode/) {print "STATUS=0"; print "PID="'${PID}'; print "INFO="$0; print '$PID' > "'${INSTALLDIR}/domain'/sample_pid.txt"} else {print "STATUS=1"; print "PID=-1"; print "INFO="$0} }'
Could cause this output:
awk: cmd. line:1: {if ($0 ~ /RUNNING mode/) {print "STATUS=0"; print "PID="27708
awk: cmd. line:1: ^ unexpected newline or end of string
I've tried throwing many combinations of special characters into ${RESULT} and it never has issues. I'll probably rewrite the command anyway but I am curious about what ${RESULT} could be both as an educational point and also to help me reproduce the error that was reported to me from a test system, which I haven't otherwise been able to reproduce.
Thanks!