Talk:Shebang
From Wikipedia, the free encyclopedia
Contents |
[edit] Boring Unix/Linux wars
It's unfortunate whenever an article gets caught up in the Unix/Linux flamewars (as this article seems to be trending). We've now actually gone through several iterations of whether bash belongs to Unix, Linux, or both. Personally, because bytes are cheap, I preferred the version that included both and let the reader choose which link to follow, but someone else changed that recently.
What does everyone else think? Should bash be followed by just Unix, just Linux, or both?
Atlant 17:41, 11 Apr 2005 (UTC)
- Neither. Either alone is wrong (given that bash runs on both Unices and Linux), and it's unnecessary for this qualification, or indeed the entire phrase, to even be here here at all. (I just moved the text over from file format verbatim.) There's no similar note about the Perl script in the subsequent example. And, indeed, from the specific point of view of shebang, scripts and batch files are not equivalent. Uncle G 18:16, 2005 Apr 11 (UTC)
Perl is somewhat different in that it would be viewed by most users as a "full-fledged programming language" (or "scripting language", depending upon your tastes). bash, by comparison, would probably be viewed as a shell first and only secondarily as a programming language. Also, Perl runs everywhere including many implementations that are decidedly non-Unix/non-Linux whereas bash exists primarily in the Unix/Linux world. So the lack of qualifications on Perl doesn't indicate much to me as to how we should treat bash.
Atlant 18:44, 11 Apr 2005 (UTC)
perl is not usually in /bin rather /usr/bin/perl, so I've changed it. The article also makes it sound like perl is a shell like the other shells mentioned. As to the bash question, as its the default on OSX now its definitly not Linux only. Htaccess
- bash was also default on BeOS -before- it was guaranteed to be the default on a Linux box. I remember Linux distros with tcsh as default in the early days, for instance. So its not Linux only. I also have it run, as a later option, as default on my IRIX and NetBSD machines, and its an extremely portable programme. --Kiand 20:16, 23 August 2005 (UTC)
[edit] space
Note that (as pointed out in the book "Classic Shell Scripting" by Robbins and Beebe) that some [admitedly obscure] systems look for "#! /" (pound, bang, space, slash) to trigger invocation of programs. And no extant system is bothered by a space after the bang. So for portability you'd want
#! /bin/sh
for an sh invocation you'd really want
#! /bin/sh -
to keep user options to the script from being taken as options to sh. Nahaj 17:44, 23 September 2005 (UTC)
ARGH. My pre-publication copy of of the had it, but I just looked at the publication copy and I cant find it. Nahaj 18:18, 23 September 2005 (UTC)
[edit] Shebang etymology
The links for the etymology of Shebang from char-a-banc are very questionable. The first link states "other sources suggest a derivation from French char-a-banc..." but don't list these sources. The second link doesn't mention char-a-banc. Without sources for the proposed etymology, the "suspected origination" in the article should be removed. 68.195.209.181 03:48, 5 July 2006 (UTC)
[edit] 2007-02-9 Automated pywikipediabot message
--CopyToWiktionaryBot 06:32, 9 February 2007 (UTC)