[TUHS] Shell control through external commands
mascheck at in-ulm.de
Tue Sep 13 10:17:55 AEST 2016
On Mon, Sep 12, 2016 at 02:50:10PM +0200, Joerg Schilling wrote:
> > > The colon was introduced by AT&T around 1983.
> > It's a builtin in the v7 Bourne shell - see SYSNULL in msg.c (which
> > has the command name table) and in xec.c (which has the implementation)
> You are missinterpeting things.
> The colon in line one as a hint to a modified csh to call the Bourne Shell
> first appeared around 1983.
I'm still confused (you're short with context): what does "introduced by AT&T" mean?
I only know the #-hacked csh from 2BSD+ ('79), and the #-hacked sh from 3BSD+ ('80).
How would ":" as a hint in this respect show up on other systems?
BTW: academic but funny side effect of : as no-op instead of real comment:
: `echo output 1>&2`
actually writes to stderr.
Normal Wilson wrote:
> [...] A hack emerged: if csh encountered a script file, it would read the
> first character; if that was '#' it was a csh script, otherwise it handed
> off to /bin/sh.
lesser known fact: even sh was hacked on BSDs (since 3BSD) with this #-csh magic,
and also exec'ed to csh. This then co-existed with the soon coming implementation
of "#" as comment character.
More information about the TUHS