Hello, I’m want to execute shell script from macro which executes some commands like curl or calling other python scripts. Noticed that bash script runs and even the commands return value inside shell returns true but as in below example the curl output in not generated.
– macro –
Sub execProg()
DIM x
x = Shell(" bash /home/usr1/test_print.sh")
msgbox(x)
End Sub
---- test_print.sh —
#!/bin/bash
OUT="/home/usr1/test.out"
curl -o test.jpg https://www.keycdn.com/img/example.jpg
if [ $? -eq 0 ]; then
echo "CURL:$(date)" > $OUT
else
echo "CURL Failed:$(date)" > $OUT
fi
test.out shows curl succeeded but there is no test.jpg. Any ideas what am i missing here?