
The first is by far the simplest for the specific case on hand however, it may not generalize to cover your other scenarios that you've not yet listed. However, if you need to filter out the first 6 entries, you need a program that handles 'lines' ended by NUL instead of newline.and I'm not sure there are any. This works regardless of the contents of the name (the only two characters that cannot appear in a file name are slash and NUL, and the slash causes no problems in a file path, so using NUL as the name delimiter covers everything). name 'Lemon*.mp3' -print0 | xargs -0 mplayer

#MPLAYER OSX EXTENDED WONT CLEAR PLAYLIST MAC OS#
If you have GNU find and GNU xargs (or FreeBSD (*BSD?), or Mac OS X), you can also use the -print0 and -0 options, as in: find. Using the double quotes around the file name is key to the loops working correctly. For my money, if you have file names containing a newline, you should rename the file without the newline. The read loop doesn't work if file names contain newlines the others work correctly even with newlines in the names (let alone spaces). So, to find the drummers of each band using grep: find bands/ -type f -exec grep Drums ' ' The find command can be made to handle the space in Dream Theater and King's X. Given the following file system: bokeh]# tree -charset assci bands I know that I'm not answering the xargs question directly but it's worth mentioning find's -exec option. Since the latter forms above (without the grep) alters the behavior of Dick.Guertin's original answer, a direct edit is perhaps not appropriate anyway. This is perhaps more appropriate as a comment or an edit to that answer, but at the moment I do not have enough reputation to comment and can only suggest edits. Otherwise you can use a basic regex character class bracket expression and manually enter the space and tab characters in the delimiters.

That assumes you have a sed that supports -r (extended regex) such as GNU sed or recent versions of bsd sed (e.g., FreeBSD which originally spelled the option "-E" before FreeBSD 8 and supports both -r & -E for compatibility through FreeBSD 11 at least). Then, of course, the filename may have other whitespace than blanks (e.g., a tab): ls | sed -r 's|]|\\\1|g' | xargs. More generically (e.g., when processing a batch of files some of which have spaces, some not), just skip the grep: ls | sed 's| |\\ |g' | xargs. įurthermore, the grep is only necessary if you only want files with spaces in the names. You can just have sed add the escaped spaces directly: ls | grep ' ' | sed 's| |\\ |g' | xargs.
#MPLAYER OSX EXTENDED WONT CLEAR PLAYLIST CODE#
But it could be simpler - you don't really need a unique character. News January 17th, 2022, FFmpeg 5.0 'Lorentz' FFmpeg 5.0 'Lorentz', a new major release, is now availableFor this long-overdue release, a major effort underwent to remove the old encode/decode APIs and replace them with an N:M-based API, the entire libavresample library was removed, libswscale has a new, easier to use AVframe-based API, the Vulkan code was much improved, many new filters were. Dick.Guertin's answer suggested that one could escape the spaces in a filename is a valuable alternative to other solutions suggested here (such as using a null character as a separator rather than whitespace).
