Spaces in paths can be a real pain – especially when doing some bulk processing. To keep it quick – how do you then for example look for all AVI files in a given directory and feed them to mplayer? (and the paths DO contain spaces)
Here’s the magic command:
find . -iname '*.avi' -print0 | xargs -0 mplayer
It does exactly what you need. Below is a relevant paste of xargs‘ manpage:
--null -0 Input items are terminated by a null character instead of by whitespace, and the quotes and backslash are not special (every character is taken literally). Disables the end of file string, which is treated like any other argument. Useful when input items might contain white space, quote marks, or backslashes. The GNU find -print0 option produces input suitable for this mode.