I tried to use the code below :
read choice
case $choice in
"1") less /var/log/messages
if [$? -ne 0]; then
less /var/log/syslog
fi
;;
etc
etc
etc
*) echo "Please enter a choice between 1 and 20";;
esac
when executing ./myScript.sh I got this :
./myScript.sh: line 4: [1: command not found
I can't find the problem !