Green’s Dictionary of Slang

shave-and-a-haircut n.

[the echoic rhythm of the phr.]

1. (orig. US) a sequence of knocks in the rhythm tum-ti-ti-tum-tum; often as shave-and-a-haircut – two/six bits/ten cents, which has a final tum-tum.

[US]M. Braly On the Yard (2002) 196: Cool Breeze rapped shave-and-a-haircut-sixbits on the metal door.
[Aus]R.G. Barrett You Wouldn’t Be Dead for Quids (1989) 98: He heard a loud ‘shave and a haircut, two bits’ banged on his front door.
[US]R. Price Clockers 461: He heard someone tapping ‘Shave and a Haircut’ on a car horn.
[US]C. Hiaasen Stormy Weather 259: He knocked seven times in a neighborly cadence — shave-and-a-haircut, two bits.
[Aus]T. Winton ‘Small Mercies’ in Turning (2005) 93: The horn went again: shave-and-a-haircut-ten-cents.
[US]T. Robinson Hot Enough For Ya?‘’ in Dirty Words [ebook] Ricardo rapped ‘shave and a haircut’ on the bathroom door.

2. attrib. use of sense 1.

[US](con. WWII) F.I. Gwaltney Heaven and Hell 53: I heard the shave-and-a-haircut signal from an outpost machine gun.
[US]L. Bruce How to Talk Dirty 60: Substituting my own knock [...] for the regular pickup man’s ‘shave-and-a-haircut’ rapping.
[Aus]Hackworth & Sherman About Face (1991) 120: They had down pat a ‘shave and a haircut, two bits’ duet.