我试图弄清楚如何解决此代码...
echo -n "Enter you complaint : ";
read complaint;
if [[ -z $complaint ]] || [[ $complaint != 'FIRE' ]] || [[ $complaint != 'INTOXICATION' ]] || [[ $complaint != "INJURY" ]] || [[ $complaint != "BREAKAGE" ]] ;then
echo "Not a good option";
exit 1;
fi
case $complaint in
FIRE) = $complaint=$(echo "FIRE");;
INTOXICATION) = $complaint=$(echo "INTOXICATION");;
INJURY) = $complaint=$(echo "INJURY");;
BREAKAGE) = $complaint=$(echo "BREAKAGE");;
esac
是否可能知道:为什么即使我键入有效的内容也总是输入?
MM们