Shave and a Haircut

"Shave and a Haircut" and the associated response "two bits" is a seven-note musical call-and-response couplet, riff or fanfare popularly used at the end of a musical performance, usually for comedic effect. It is used melodically or rhythmically, for example as a door knock.
"Two bits" is a term in the United States and Canada for 25 cents, equivalent to a U.S. quarter. "Four bits" and "Six bits" are also occasionally used, for example in the cheer "Two bits, four bits, six bits, a dollar." The final words may also be "get lost", "drop dead" (in Australia), or some other facetious expression. In the UK, it was often said as "five bob" (slang for five shillings), although words are now rarely used to accompany the rhythm or the tune.
History.
An early occurrence of the tune is from an 1899 Charles Hale song, "At a Darktown Cakewalk". Other songs from the same period also used the tune. The same notes form the bridge in the "Hot Scotch Rag", written by H. A. Fischler in 1911.
An early recording used the 7-note tune at both the beginning and the ending of a humorous 1915 song, by Billy Murray and the American Quartet, called "".
In his 1933 novel, "Hizzoner the Mayor", Joel Sayre wrote of boats "tooting the official Malta welcome blast to the tempo of 'Shave-and-a-haircut-two-bits, shave-and-a-haircut-two-bits, shave-and-a-haircut-two-bits', which was soon taken up by every craft in the harbor that had a boiler", indicating that the tune was already associated by that time with the lyric.
In 1939, Dan Shapiro, Lestor Lee and Milton Berle released "Shave and a Haircut – Shampoo", which used the tune in the closing bars. In the same year, Rosalind Rosenthal and Herbert Halpert recorded "Shave and a Haircut, Bay Rum".
Popularity.
The tune can be heard on customized car horns, while the rhythm may be tapped as a door knock or as a Morse code "dah-di-di-dah-di, di-dit" ( –··–·   ·· ) at the end of an amateur radio contact.
The former prisoner of war and U.S. Navy seaman Doug Hegdahl reports fellow U.S. captives in the Vietnam War would authenticate a new prisoner's U.S. identity by using "Shave and a Haircut" as a shibboleth, tapping the first five notes against a cell wall and waiting for the appropriate response. U.S. POWs were then able to communicate securely with one another via a tap code.
The tune has been used innumerable times as a coda or ending in musical pieces. It is strongly associated with the stringed instruments of bluegrass music, particularly the 5-string banjo. Earl Scruggs often ended a song with this phrase or a variation of it. On the television show "The Beverly Hillbillies", musical cues signifying the coming of a commercial break (cues which were in bluegrass style) frequently ended with "Shave and a Haircut". It is the most popular bluegrass run, after the G run.
"Shave and a Haircut" was used in many early cartoons, particularly "Looney Tunes" cartoons. It was also used as an ending to many cartoon shows, just after the credits. Decades later, the couplet became a plot device to lure-out an intended victim, as used by Judge Doom in the film "Who Framed Roger Rabbit", the idea being that toons cannot resist finishing with the "two bits" when they hear the opening rhythm.
Usage.
The phrase has been incorporated into countless recordings and performances. Notable examples include:
Uses in other countries.
The Italian version is "Ammazza la vecchia … col Flit!" ("English": "Kill the old lady … with Flit!")—"Flit" being an old brand of DDT insecticide. This is a humorous popular version of a post-World War II commercial "Ammazza la mosca... col Flit" ("English": "Kill the fly with Flit!").
The tune is used in Catalan with a different lyric: "Nas de barraca … Sant Boi" ("English": "Shack nose … Sant Boi"). It is also tapped, as a door knock. The Catalan lyrics may come from Blanes, where it was sung twice with "Nas de barraca. Sant Boi. Cinc de carmelos pel noi" ("English": Shack nose. Sant Boi. Five candies for the boy).
In Spain, it is sung with the lyrics, "Una copita … de Ojén" ("English": "A shot … of schnapps").
In Mexico, it means a vulgar insult with the lyrics, "Chinga tu madre … cabrón" (English: "Fuck your mother … bastard").
In Irish barroom music, the tune is sometimes tagged at the end of a song. The performer sings the first part to the lyrics, "How is your aul' one?" (read: "old one", a slang term for mother), to which the audience replies, "Gameball!" (A slang term meaning A-OK).
In Sweden, it is well known as "Kvart över elva … halv tolv", which means "A quarter past eleven … half past eleven". The twist doesn't work as well in English, as the English time system treats 11:30 as a continuation of eleven instead of as the first half of twelve. "Halv tolv" thus means "half twelve" and is the correct Swedish equivalent of half past eleven. In Sweden, the melody was also used in a commercial for the Bronzol brand of candy with the slogan "Hälsan för halsen — Bronzol" ("English": Health for the throat — Bronzol).
In Icelandic, the lyrics are "Saltkjöt og baunir … túkall" ("English": "Salt meat and split peas … two krona" (króna is the currency in Iceland)).
In the Netherlands, the phrase is used when someone leaves with the intention to not return. "Die zien we nooit meer, te-rug" ("English": We shall never see them, a-gain). It is used as a way to make fun of someone/something, if it suddenly disappears from the scene.
In Argentina, Carlos Balá, a former children's TV show host, used to include a bit in his routine in which he would whistle the "shave and a haircut" part of the tune, prompting the children in the audience to answer "Ba-lá" to the rhythm of the two final notes.