From mboxrd@z Thu Jan 1 00:00:00 1970 From: mascheck@in-ulm.de (Sven Mascheck) Date: Tue, 13 Sep 2016 02:17:55 +0200 Subject: [TUHS] Shell control through external commands In-Reply-To: <57d6a482.xj2/kMA3y0vR9uVo%schily@schily.net> References: <201607151647.u6FGlqvW037575@tahoe.cs.Dartmouth.EDU> <20160910174011.GF5970@dnied%tiscali.it> <201609101922.u8AJMmtq024477@freefriends.org> <1bjMiH-10N-00@marmaro.de> <57d6748e.CNiWgn0QxOuugldp%schily@schily.net> <57d6a482.xj2/kMA3y0vR9uVo%schily@schily.net> Message-ID: <20160913001755.GA266082@lisa.in-ulm.de> 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. -Sven