php - Bash seems to be executing command 2nd time when variable of captured output is used -


output=$(php -f somecommand arg1 arg2 arg3 2>&1) echo "$output" >> error.log 

the script runs cron. in emailed output received looks php -f ... command run twice.

is run once when variable set, , again when variable echoed? don't remember behavior happening before.

if happening... how program output variable without re-executing program?


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -