Does "shebang" mean "bang she"?
Why not "hebang" as "bang he"?
- 2There doesn't seem to be a single source, so I am not sure this question can be answered. There are multiple plausible interpretations out there but it is impossible to determine which is back-formation and which is the original source. The jargon file and wikipedia entries mention several possible explanations.jw013– jw0132014-08-07 17:22:21 +00:00Commented Aug 7, 2014 at 17:22
- 1Relevant historyjw013– jw0132014-08-09 05:12:15 +00:00Commented Aug 9, 2014 at 5:12
- 3(ha)shbang perhaps?captcha– captcha2014-11-11 10:35:48 +00:00Commented Nov 11, 2014 at 10:35
5 Answers
Another interesting name derivation from here.
Among UNIX shell (user interface) users, a shebang is a term for the "#!" characters that must begin the first line of a script. In musical notation, a "#" is called a sharp and an exclamation point - "!" - is sometimes referred to as a bang. Thus, shebang becomes a shortening of sharp-bang
- 11This appears in the Wikipedia article as well, complete with dmr saying he didn't invent the name.Gilles 'SO- stop being evil'– Gilles 'SO- stop being evil'2014-08-07 18:50:00 +00:00Commented Aug 7, 2014 at 18:50
'Historical' Note: I'm 68 years old and work with IBM Mainframes since 1968 (yes, System /360). I recall that we were used to that word, long before Linux and "#!" things. It used to appear on Comments of written Code, and we 'mimicked' them. The meaning of shebang, as 'all these things', we translated in Portuguese as "esta bagaça" (yep, no good meaning...).
bagaça is what you get, other than the liquid syrup, when you smash sugar cane.
- Not a native English speaker here, still, I'd be doubtful that shebang we talk about here relates to the English idiom "the whole shebang" (meaning "all things related", as in "While I'm in London, I want to see Big Ben, the palace, the whole shebang.") with the interesting etymology going back to the US Civil War / Walt Whitman (etymonline.com/word/shebang). False friends, perhaps ?pavol.kutaj– pavol.kutaj2022-10-24 06:59:25 +00:00Commented Oct 24, 2022 at 6:59
Taken from Wikipedia (gasp!):
The name shebang for the distinctive two characters comes from an inexact contraction of SHArp bang or haSH bang, referring to the two typical Unix names for them. Another theory on the sh in shebang is that it is from the default shell sh, usually invoked with shebang.[18][19] This usage was current by December 1987,[20] and probably earlier.
- (1) What does "bang" mean? (2) Still just "sh" not "she". why not "shbang"?Tim– Tim2014-08-07 16:47:05 +00:00Commented Aug 7, 2014 at 16:47
- 9(1) "bang" is an onomatopoeic interpretation of "!". (2) As the Wikipedia page shows, it's also spelled "sha-bang".dg99– dg992014-08-07 16:48:49 +00:00Commented Aug 7, 2014 at 16:48
- 4@Tim shb is not really a natural-sounding consonant in English, so some vowel is required to separate the sh from the b.jw013– jw0132014-08-07 17:17:33 +00:00Commented Aug 7, 2014 at 17:17
From TLDP (I think this is more accurate than Wikipedia):
[1] More commonly seen in the literature as she-bang or sh-bang. This derives from the concatenation of the tokens sharp (#) and bang (!).
The word "shebang" was already in existence (wiktionary) - while it bears no connection in meaning, it's not hard to imagine a new phrase 'hash bang' being whimsically renamed because of its resemblance to an existing word.