[CentOS] Real sh? Or other efficient shell for non-interactive scripts
Joerg Schilling
Joerg.Schilling at fokus.fraunhofer.de
Mon Apr 27 10:32:30 UTC 2015
Stephen Harris <lists at spuddy.org> 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 at schily.net (home) Jörg Schilling D-13353 Berlin
joerg.schilling at fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.org/private/ http://sourceforge.net/projects/schilytools/files/'
More information about the CentOS
mailing list