[Ilugc] [GVL] bash and sh difference?

  • From: rsubr@xxxxxxxxxxxxxxxxxxxxxxxx (Raja Subramanian)
  • Date: Tue Jan 25 12:49:46 2005

Hi,

T.R.Shashwath wrote:

On Sunday 23 Jan 2005 2:07 pm, Kumar Appaiah wrote:
In the Shell scripting class held last Saturday, I asked whether sh
isn't just a symbolic link to bash on Linux systems, and that wasn't
agreed upon.

The same is true for Debian. Is it so on *all* GNU/Linux systems?

sh is a part of the POSIX standard.  Bash is backwards compatible with sh and
provides POSIX compliant sh like syntax/behaviour.  And since it's the default
on several linux distros, it naturally plays a dual role as sh.

Absolutely. At least, on all that I've seen...

If you install the "dash" package on debian sarge, your sh will be
symlinked to dash instead.

It's a symlink just so that the admin can change it to whatever he wants. Some
people prefer to have csh or ksh as default, for example. Bash is the
standard, though. At least, de facto standard...

People who link sh to csh, ksh, etc. are all asking for trouble.

See this thread -
    http://lists.debian.org/debian-devel/1998/08/msg00258.html

- Raja

Other related posts: