He who can, does; he who cannot, teaches
A criticism of the teaching profession, portraying it as second best.
Many expressions are attributed to GBS - this one correctly so.
George Bernard Shaw wrote this in his play Man and Superman, 1903. It is included as Maxim 36 in the Maxims for Revolutionists that is included in the work. It's not clear if Shaw was expressing his own opinion of those who Bob Dylan, in his song My Back Pages, called 'the mongrel dogs who teach', or whether it was merely the opinion of one of the play's characters. Another Shaw quotation about teaching gives us a clue:
"A fool's brain digests philosophy into folly, science into superstition, and art into pedantry. Hence University education."