To shave a customer. Hotten says, when a master-draper sees
anyone capable of being imposed upon enter his shop, he strokes his
ohin, to signify to his assistant that the customer may be shaved.
I shaved through; he was within a shave of a pluck.
I just got through [my examination]; he was nearly rejected as not
up to the mark. The allusion is to carpentry.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894