root@iZm5ebwtdyoe99lpvnt1o6Z:~# ll /bin/sh lrwxrwxrwx 1 root root 4 Dec 14 18:54 /bin/sh -> dash*
默认为dash,而不是bash
解决办法:
# sh -n database.sh #检测脚本是否正确,并不执行 # sh -x database.sh #执行脚本,输出执行过程