[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: zsh



Ainsi parlait edeveaud@pasteur.fr :
> On Thu, 13 Dec 2001, Charles Goyard wrote:
> 
> > Ainsi parlait edeveaud@pasteur.fr :
> > >
> > > attention, sur debian sh == bash
> >
> > Pas tout à fait. Lorsqu'il est appelé sous le nom sh, bash se comporte
> > comme un sh « normal » et tâche (avec plus ou moins de succès) de faire
>                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> CQFD

Sur Debian, sh est plus ou moins égal à bash, pour être précis.

En regardant le manuel, il semblerait que les différences ne soient
qu'au niveau du _démarrage_ du shell, donc pas tant de différences que
ça...


extrait du man de bash :

       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.  When invoked as an interactive login  shell,  or  a
       non-interactive  shell  with  the --login option, it first
       attempts to read and execute  commands  from  /etc/profile
       and ~/.profile, in that order.  The --noprofile option may
       be used to inhibit this  behavior.   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 exe­
       cute.  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.


-- 
Charles



Reply to: