Among other things -- are you sure you are using bash? The
/bin/sh in my OBSD 6.0 is linked to:
26004 -r-xr-xr-x 3 root bin 554K Jul 26 2016 ksh*
26004 -r-xr-xr-x 3 root bin 554K Jul 26 2016 rksh*
To find out for sure, start with this:
which sh (if using tcsh as your personal shell)
(or "ls /bin/sh" to make sure that is there)
Once you are sure that sh is in /bin, then this:
ls -i /bin/sh
and you should get something like this:
26004 /bin/sh
then follow that with
"ls -i /bin | grep 26004" (or whatever number the previous command gave
you), and you will see a listing of all the names linked to the
same file (-i gives you the inode number):
and get something like:
======================================================================
# ls -i /bin | grep 26004
26004 ksh
26004 rksh
26004 sh
======================================================================
In other words -- all the names which are linked to that one
file.
Now -- did you actually install bash from the packages? It is
not installed by default. And based on the above, if you ran
/bin/sh /path/to/my/script
you would be trying to run a bash script in the Korn shell (/bin/ksh),
and that and bash use different extensions over /bin/sh.
You have to download it from the OBSD packages site for your
cpu, and then install it. For OBSD 6.0, a check through there finds
this as the install for bash:
bash-4.3.46.tgz
For that matter -- which linux? For the nearest one to reach,
(Ubuntu 18.04.2), the default shell is dash, not bash, nor ksh, nor
zsh).
Good Luck,
DoN.
--
Remove oil spill source from e-mail
Email: <
BPdnic...@d-and-d.com> | (KV4PH) Voice (all times):
(703) 938-4564
(too) near Washington D.C. |
http://www.d-and-d.com/dnichols/DoN.html
--- Black Holes are where God is dividing by zero ---