2 # The nextline takes the value in parameter one, evaluates it
3 # (necessary if it contains spaces) and runs it. > redirects
4 # stdout to the logfile given in parameter 2. 2>&1 redirects
5 # stderr to stdout (i.e. to the logfile).
7 RetVal=$? # captures the return value of the command
8 if [ $RetVal -ne 0 ]; then
10 echo "Please check the logfile" $2 "for errors"