Origin of the 'Shave and a Haircut' thing

You know the knock: Bump budda bump bump… bump bump.
Otherwise known as: “Shave and a haircut… two bits”
It’s been used coutless times in movies and TV and I’d chance a guess that most Americans know the knock.
But where the hell did it come from?

thats odd… the board cut off the last 3/4ths of my post subject. What it should have said is: “Origin of the Shave and a Haircut knock?”

According to http://www.sfs.nphil.uni-tuebingen.de/linguist/issues/9/9-221.html it has quite a different meaning in Mexico.

its a song… a very old song. very old, but also very catchy, which is why the idiots in the twenties made it into a secret knock, which, by the way is one of the biggest misnoma’s of all time, along with “Surfer’s Paradise” and “The Gold Coast”, (that’s an aussie thing), because as you mentioned it is featured in countless movies. Gary Larson has a pretty funny cartoon about it.

Yup, the software doesn’t like quote marks in post subjects.

This was covered in one of Cecil’s books, I think, but the column’s not online yet. The only thing I remember for sure is that the rhythm was first written and used repeatedly in a piece for a dance called the cakewalk.

I’ve edited the title of the thread to attract people who know the answer. Sorry about that little bug in the software.