Note: the "nifty way" contains
-print0
and your code does not.
-print0
and your code does not.