The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: cowan@mercury.ccil.org (John Cowan)
Subject: [TUHS] History of #! interpretation in Unix
Date: Sun, 16 Jan 2011 15:17:46 -0500	[thread overview]
Message-ID: <20110116201745.GE3374@mercury.ccil.org> (raw)
In-Reply-To: <20110116191942.GA26424@lisa.in-ulm.de>

Sven Mascheck scripsit:

> DMR might have known the csh-hack (and if a comment character is
> implemented anywhere, here csh, then it's obvious to use it for #!)

That might account for the "#", but not for "#!" taken together.
Having two different people invent the shebang independently (as opposed
to *implementing* it independently, as has happened many times -- 8th
Edition, SVR4, Linux, etc.) is just too improbable for me to swallow.

> > > I thought sh-like shells in general try to interprete scripts themselves
> > > upon an ENOEXEC.  Do you know certain shells which actually call "/bin/sh"?
> > 
> > Yes, seemingly bash does that too.  Bogus.
> 
> How'd you get the impression?  I can't verify this.

No, I meant that bash does what ksh does: uses itself, which means that a
shebang-free script runs differently on bash, ksh, dash.  This is IMHO
unfortunate.

> (That's the only way how executing on in POSIX shell is possible, BTW,
> because neither #! nor paths are standardized).

Good point.  IMHO the Posix sh definition should be extended so that all
shells claiming Posix-compliance should do shebangs.

-- 
John Cowan  cowan at ccil.org  http://ccil.org/~cowan
And now here I was, in a country where a right to say how the country should
be governed was restricted to six persons in each thousand of its population.
For the nine hundred and ninety-four to express dissatisfaction with the
regnant system and propose to change it, would have made the whole six
shudder as one man, it would have been so disloyal, so dishonorable, such
putrid black treason.  --Mark Twain's Connecticut Yankee



  reply	other threads:[~2011-01-16 20:17 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-16  8:43 Warren Toomey
2011-01-16  9:55 ` John Cowan
2011-01-16 13:20   ` Sven Mascheck
2011-01-16 17:17     ` John Cowan
2011-01-16 19:19       ` Sven Mascheck
2011-01-16 20:17         ` John Cowan [this message]
2011-01-16 20:42           ` Larry McVoy
2011-01-16 21:08           ` Sven Mascheck
2011-01-16 21:37             ` John Cowan
2011-01-17 16:35               ` Warner Losh
2011-01-17 20:47                 ` John Cowan
2011-01-17 10:09           ` Tim Bradshaw
2011-01-16 10:53 ` Wilko Bulte
2011-01-17 16:25   ` Warner Losh
2011-01-17 19:02 ` Jeremy C. Reed
2011-01-17 20:51   ` John Cowan
2011-01-17 22:41     ` Jeremy C. Reed
2011-01-17 20:58   ` Sven Mascheck
2011-01-19  4:10   ` Cyrille Lefevre
2011-01-19 20:35     ` Sven Mascheck
2011-01-20  4:09       ` Cyrille Lefevre
2011-01-28 19:38   ` Jeremy C. Reed
2011-01-30 15:05     ` Sven Mascheck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110116201745.GE3374@mercury.ccil.org \
    --to=cowan@mercury.ccil.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).