Now that jon has given you the Taoist version, I'll give you what I know of the Buddhist version of the legend.

Unfortuantely, I cannot remember this monk's name but supposedly there was a Shaolin...