为什么以下脚本显示“意外操作员”消息并在使用 运行时失败sh,但使用bash.
sh
bash
#!/bin/sh if [ $UID -ne 0 ] then echo "You must be root." exit 1 else echo "Open sesame." exit 0 fi
shell-script
shell-script ×1