Re: [SLUG] two simple questions about bash and the path

From: Ronald KA4INM Youvan (ka4inm@tampabay.rr.com)
Date: Tue Mar 11 2003 - 23:21:00 EST


< On nearly any modern linux system, sh is actually a symlink to bash

(or, as used to be the case with slack and debian, sh would be a link

to something like /etc/alternatives/sh, which was in turn a link to

/bin/bash) , which runs in sh compatibility mode when called as sh,

but still retains all its bashy features.

>
   My less modern LINUX system uses bash to simulate sh but I seem to
remember, and don't have the time tonight to find proof, that it acts
like sh but without the enhancements of bash. From man bash:

 --norc Do not read and execute the personal initialization file

~/.bashrc if the shell is interactive. This option is on by default

if the shell is invoked as sh.
and

   If bash is invoked with the name sh, it tries to mimic the startup behavior
of historical versions of sh as closely as possible, while conforming to the POSIX
standard as well.

and

   When invoked as an interactive shell with the name sh, bash looks for the
variable ENV, expands its value if it is defined, and uses the expanded value as
the name of a file to read and execute.
   Since a shell invoked as sh does not attempt to read and execute commands
from any other startup files, the --rcfile option has no effect. A
non-interactive shell invoked with the name sh does not attempt to read any
other startup files. When invoked as sh, bash enters posix mode after the
startup files are read.

   Most of the better bash features were added with Ver 2.0, I doubt that they
are available when invoked as sh. I never use anything other than bash.
I just upgraded to version 2.05b.

-- 
        73 (= Best Regards) de: Ron ka4inm@tampabay.rr.com
     100% Slack. since July, 1997 (still free!) SENT D&T are UTC
        Visit my HAM Web SITE at: http://www.qsl.net/ka4inm



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 16:52:25 EDT