For some reason, I cannot get AppleScript's "do shell script" to use the latest (GPLv3) Bash:
do shell script "/usr/local/bin/bash; echo $BASH_VERSION" -- Result: "3.2.57(1)-release"
Strangely, it does work with an external .sh script:
#!/usr/local/bin/bash echo $BASH_VERSION
Calling it like:
do shell script "~/Library/Scripts/Script.sh" -- Result: "5.0.17(1)-release"
What's the difference and can I get it to work inside the .scpt script as well?