bash : Bad Substitution

The default shell (/bin/sh) under Ubuntu points to dash, not bash. So if you chmod +x your_script_file.sh and then run it with ./your_script_file.sh, or if you run it with bash your_script_file.sh, it should work fine. Running it with sh your_script_file.sh will not work because the hashbang line will be ignored and the script will be … Read more