Calling the function
systemlist("<command>") retrieves the stdout output from a shell call to
<command>. How can I retrieve the exit status of that command?
For example, I would like to do something like this:
let output = system_call_with_exit_status("my_shell_command") let stdout = output let exit_status = output if (exit_status != 0) echo output endif
The intention is to print the output from
my_shell_command only if the command gives a non-zero exit status.