Good Morning All..
I was wondering about getting exit codes of a command in a shell script. I'm trying to run uvscan (McAfee command line scanner) and I want to have the log file say why, if at all, the process failed/exited.
Something to the extent of
If [ (result of uvscan) = x ]; then
echo "This is why it quit"
Here's what I have so far..
If [[ `pgrep $PROC` = 0 ]] ; then
pkill uvscan
Elseif
[[ 'pgrep $PROC' = 1 ]] ; then
nohup $UVSCAN_PATH/uvscan -c -f $DIRECTORIES -d $DAT_PATH -m $QUARANTINE -r --secure
After this last command is where I want to make a sub (?) routine of ifs/thens depending on how the command exits.
I hope someone can help me out here? Or am I way in left field?
Thanks from a new user,
cmschube