My simple script is like this:
#!/bin/sh
DEF=.file_name_with_a_leading_dot.sh
. ${DEF}
Notice the /bin/sh on the top line. When I run that simple script I get an error that the file isn't found. But, if I change that top line to #!/bin/bash then the script finds that file in the current directory just fine.
But, On my Ubuntu linux laptop I see that /bin/sh is a symlink to /bin/bash . So, why does my script behave differently?
Also, I can run the script like this:
/bin/bash ./script.sh
And it's OK.
So, what am I missing?