My default shell is fish, because it's a lot nicer. But often when I run scripts, I get errors that seem to be from the bash script being processed by fish. I think this is because the script writer assumed that the default shell is bash, but I don't understand the mechanism.
For instance, the CrashPlan install.sh script starts with a bash shebang:
~/CrashPlan-install> head install.sh
#!/bin/bash
#############################################################
# Linux Client Installer Script
#############################################################
So when I run ./install.sh it should be processed by bash, right? The default terminal shell should be irrelevant. Yet, when my default shell is fish, running scripts like this causes fish to return errors, as if it's processing the script:
fish: Expected a command name, got token of type “Run job in background”. Did you mean
“COMMAND; and COMMAND”? See the help section for the “and” builtin command by typing “help and”.
Standard input: sed -imod "s|Exec=.*|Exec=/usr/local/crashplan/bin/CrashPlanDesktop|"
/home/username/Desktop/CrashPlan.desktop && rm -rf /home/username/Desktop/CrashPlan.desktopmod
Is this because of a misconfiguration of my computer or because the script is written in a non-portable way?