Reputation: 1677
I have this wonderful music library app: beets.
When I run beet ls somequery -f
, I get a newline-separated list of my music files' paths. Unfortunately, the paths contain unescaped spaces and I can't feed mplayer like this:
mplayer `beet ls smooth`
This doesn't work either:
mplayer $((q)beet ls smooth)
Could anyone provide a compact solution?
Upvotes: 0
Views: 351
Reputation: 3847
Use xargs
:
beet ls smooth | xargs mplayer
This will protect the filenames against spaces, but not newlines. (I'm assuming they don't contain newlines, as the program beet
produces a newline-separated list.)
Upvotes: 1