J
Jake Cahoon
I need to run a system command, find out if it failed and put its
output in a log file. The way I am trying to do it right now is to
get the exit code from the command with system() but then I don't know
how to capture its output. The backticks are the opposite problem. I
can capture the command's output but I don't know what its exit code
is. It just seems like an ugly solution to me to have to pattern
match the command's output just to see if the command executed
successfully.
Anyone have some tips?
Thanks,
J Cahoon
output in a log file. The way I am trying to do it right now is to
get the exit code from the command with system() but then I don't know
how to capture its output. The backticks are the opposite problem. I
can capture the command's output but I don't know what its exit code
is. It just seems like an ugly solution to me to have to pattern
match the command's output just to see if the command executed
successfully.
Anyone have some tips?
Thanks,
J Cahoon