12

Does "shebang" mean "bang she"?
Why not "hebang" as "bang he"?

  • 6
    I'm so tempted to write a frivolous answer to this. But I shall desist. – Faheem Mitha Aug 7 '14 at 16:42
  • 1
    @FaheemMitha I will assist you: en.wikipedia.org/wiki/William_Hung – dg99 Aug 7 '14 at 16:50
  • 2
    There 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 Aug 7 '14 at 17:22
  • Relevant history – jw013 Aug 9 '14 at 5:12
  • 3
    (ha)shbang perhaps? – captcha Nov 11 '14 at 10:35
20

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

  • 6
    This appears in the Wikipedia article as well, complete with dmr saying he didn't invent the name. – Gilles Aug 7 '14 at 18:50
6

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 Aug 7 '14 at 16:47
  • 7
    (1) "bang" is an onomatopoeic interpretation of "!". (2) As the Wikipedia page shows, it's also spelled "sha-bang". – dg99 Aug 7 '14 at 16:48
  • 3
    @Tim shb is not really a natural-sounding consonant in English, so some vowel is required to separate the sh from the b. – jw013 Aug 7 '14 at 17:17
2

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 (!).

http://tldp.org/LDP/abs/html/sha-bang.html#FTN.AEN205

1

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.

1

'Historical' Note: I'm 68 years old and work with IBM Mainframes since 1.968 [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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.