On Centos my script work fine. But on Debian Squeeze when I run script, I got:
cpfailover.sh: 30: Bad substitution
Line of script say:
SCRIPT_PATH="${BASH_SOURCE[0]}";
I have seen in many examples, even here, that is a correct line no. where is the problem.
Are you using /bin/sh
? On Debian Squeeze, /bin/sh
is a symlink to /bin/dash
which does not support ${array[0]}
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With