1 bash And dash
from Ubuntu 6.10 Start , By default dash(theDebian Almquist Shell) instead of bash(the GNUBourne-Again Shell) but Login Shell still bash. as a result of dash faster 、 More efficient , And it fits POSIX standard .Ubuntu It will run a lot at startup shell Script , Use dash It can speed up the startup .
2 Executing scripts often has some unknown errors
such as :build.sh: caller: not found
I have also encountered some other inexplicable mistakes
First look at your own script bash Analysis or dash Analytic , We usually use... By default bash
Use the command first ls -l /bin/sh Take a look at the script parsing of your system
3 Switch sh by bash/dash
sudo dpkg-reconfigure dash
An interface appears to select no Switch to a bash Resolved by parsing :build.sh: caller: not found
Switch back and execute the command again yes that will do