Re: Real sh? Or other efficient shell for non-interactive scripts

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



Stephen Harris <lists@xxxxxxxxxx> wrote:

> On Fri, Apr 24, 2015 at 09:47:24AM -0700, Gordon Messmer wrote:
> > On 04/24/2015 03:57 AM, Pete Geenhuizen wrote:
> > >if you leave it out the script will run in whatever environment it
> > >currently is in.
> > 
> > I'm reasonably certain that a script with no shebang will run with 
> > /bin/sh.  I interpret your statement to mean that if a user is using ksh 
>
> "It depends".
>
> On older Unix-type systems which didn't understand #! then the shell
> itself did the work.  At least csh did (sh didn't necessary).  If the
> first character was a # then csh assumed it was a csh script, otherwise
> it assumed a sh script.  That's why a lot of real old scripts began with :

As mentioned in the other mail, nearly all UNIX versions did support #! in the
mid-1980s. The only exception was AT&T.

Even the first (realtime) UNIX clone UNOS added support for #! in 1985, but 
this support was not in the kernel but in the standard command interpreter.

Jörg

-- 
 EMail:joerg@xxxxxxxxxx                    (home) Jörg Schilling D-13353 Berlin
       joerg.schilling@xxxxxxxxxxxxxxxxxxx (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.org/private/ http://sourceforge.net/projects/schilytools/files/'
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos





[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux