how to wrap the command1 return strings with single/double quotation marks (\'or\") to feed to the next command2?
Posted
by
infantcoder
on Server Fault
See other posts from Server Fault
or by infantcoder
Published on 2012-09-27T02:01:25Z
Indexed on
2012/09/27
3:39 UTC
Read the original article
Hit count: 388
For example, I want to use mplayer to play the music of several dirs, type like this in bash:
$find './l_music/La Scala Concert 03 03 03' './l_music/Echoes The Einaudi Collection' './l_music/Ludovico Einaudi - The Royal Albert Hall Concert [2 CD] (2010)' -name '*.mp3' | xargs mplayer
Well, You Know, the find command return path, which dir and file always have space, the pipe right command mplayer do not accept those mp3 path.
I think that if wrap the find return strings with single/double quotation marks (\'or\") to feed to mplayer, the problem will be solved.
But how can I do to solve the problem just use bash command, do not use bash or perl scripts, while can give me one perl line command use Perl Command-Line Options.
© Server Fault or respective owner