Quote:
Originally Posted by
ysrini
On my login i default to:
$ echo $SHELL
/usr/bin/sh
$
Now what is this shell called?
Depends what sh they have... :shrug: The generic filename doesn't tell you much.
Quote:
Can every unix/linux box can have their 'sh' be bash or korn or csh ... or is 'sh' is it's own shell and independant of bash, korn, ...?
On some linux, sh is BASH, on others its DASH. Someone might even custom-configure their system to have it be one of the various kinds of KSH and there'd be nothing wrong with that. It can be any Bourne shell.
But they ought to be all
compatible with posix SH even if they're not restricted to posix SH features. That's what POSIX is there for -- a coherent standard that ought to be obeyed by UNIX in general, even if other features are offered. So if you write your code for posix SH, it should be portable.
sh will never, ever,
ever be csh though, becase sh is supposed to be a bourne shell -- and csh is
not a bourne in any way. Even on systems which feature csh prevalently, like some BSD's, csh does not get shoehorned under the guise of sh. Only the very most trivial csh code bears any resemblance to bourne shell code.