Wrong output when run via Cron

view full story

http://www.unix.com – Hello, This may be a simple one, but i can't see what the issue is. When i run the script via CLI, then i get the correct output via the if statement, but when i run via CRON i get the wrong statement. Code: echo " Checking Job Status" >> $DIR/Bpimagecleanup_$DATE JOB_STATUS=`/usr/openv/netbackup/bin/admincmd/bpdbjobs | grep -i image | awk 'NR==1{print $4}'` echo " Finished Job Status" >> $DIR/Bpimagecleanup_$DATE echo $JOB_STATUS >> $DIR/Bpimagecleanup_$DATE if [[ $JOB_STATUS = "Done" ]];then  echo "Bpimageclea (HowTos)