From mboxrd@z Thu Jan 1 00:00:00 1970 From: meillo@marmaro.de (markus schnalke) Date: Mon, 12 Sep 2016 10:35:37 +0200 Subject: [TUHS] Shell control through external commands In-Reply-To: <201609101922.u8AJMmtq024477@freefriends.org> References: <201607151647.u6FGlqvW037575@tahoe.cs.Dartmouth.EDU> <20160910174011.GF5970@dnied%tiscali.it> <201609101922.u8AJMmtq024477@freefriends.org> Message-ID: <1bjMiH-10N-00@marmaro.de> [2016-09-10 13:22] arnold at skeeve.com > Dario Niedermann wrote: > > > > I never knew that a shell script could work without a shebang line. > > That was the simplicity of the original system, where you just made the > file executable. The shell would fork and exec as usual. When the exec > failed, the shell noticed that errno was ENOEXEC (not a runnable file) > and started interpreting the script itself. I think I've seen many eary (pre-Shebang and even pre-#-comment) shell scripts start with a colon. Is this only a coincidence with having a comment at the beginning or was the colon character magic in some way? meillo