let:not found
原因:It's because Ubuntu uses the dash shell as default and doesn't always recognize when you try to set the shell in a script.Even if you enter "echo $SHELL" into the console it will tell you you're using /bin/bash but for some reason it's actually using dash instead.
解决办法:
1.显式使用 dash filename.sh;
2.在命令行输入:sudo dpkg-reconfigure dash
Use dash as the default system shell(/bin/sh)? 选择“no”。