I have a .sh file. It includes bash syntax.
#!/bin/bash
function foo() {
// do something
}
doo()
// do something
sh doesn't link to bash on my system.
Below command doesn't work:
sh sample.sh
It throws syntax error. Below command works fine.
bash sample.sh
I think '#!/bin/bash' is useless for my case. I know that sh != bash. But do I must specify sh/bash/etc like upper example to run .sh file?