Code:
case $GROUP_NAME in
"HR" )
echo "Primary" >> $log
;;
"ERP")
if $DEPT="ACCOUNTING"; then
echo "Secondary" >> $log
else
echo "The EXCEPTION DOES NOT WORK" >> $log
fi
;;
*)
esac
Above is my CASE statement and the exception doesn't see to work if $DEPT is something else rather than "ACCOUNTING", it seems it's on process the "IF" statement even $DEPT is not even in "ACCOUNTING"
Thanks