答案1
您忘记关闭"
, 并且应该在括号前后留出空格⌴[⌴ ... ⌴]⌴
。您可以这样做:
#!/bin/bash
crontab -l
echo "Do you want to make a change (y/n) ?"
read YES_NO
if [ "$YES_NO" == "y" ]
then
echo "Ok great, do it !"
crontab -e
else
echo "Too bad, go out !"
fi
您忘记关闭"
, 并且应该在括号前后留出空格⌴[⌴ ... ⌴]⌴
。您可以这样做:
#!/bin/bash
crontab -l
echo "Do you want to make a change (y/n) ?"
read YES_NO
if [ "$YES_NO" == "y" ]
then
echo "Ok great, do it !"
crontab -e
else
echo "Too bad, go out !"
fi