bin/bash and bin/sh
hai
what is the difference between bin/bash and bin/sh |
bin/sh was the old "original" shell, it's left for nostalgic compatibility but is usually symlinked to bin/bash unless the sysadmin has another shell preference.
|
TenTenths is correct regarding the symlinking of sh to bash. My understanding is that when you put #/bin/sh at the top your your scripts though, bash will operate in Bourne Shell and perhaps lose some Bash features as stated in The Linux Documentation Project's Advanced Shell Scripting guide:
"Using #!/bin/sh, the default Bourne shell in most commercial variants of UNIX, makes the script portable to non-Linux machines, though you sacrifice Bash-specific features. The script will, however, conform to the POSIX [5] sh standard." http://tldp.org/LDP/abs/html/sha-bang.html |
This from the bash manual page:
Code:
If bash is invoked with the name sh, it tries to mimic the startup |
All times are GMT -5. The time now is 08:32 AM. |