REQ: Shell script exit status

Could you expand the functionality of the Execute a Shell Script action with options/features regarding the exit status? Some command line utilities offer many exit codes based on what happened. This allows calling scripts to react without having to parse the error text. For example, the curl utility has over 90 exit codes.

At a minimum, please add to the action’s option menu “Failure aborts macro” and “Notify on failure” options, with failure being a non-zero status.

It would be nice if the action could set the exit status number to a global variable. Similar to bash’s $? variable, have $KMVAR_? contain the status of the last script executed. This would allow subsequent shell script actions to know the status of a previous script action.


If you want a shell script to return the status, then return that from the shell script.

curl -s wombat
echo $?

1 Like