I want to use MPC (CLI interface to MPD) but unfortunately to me it does not accept piping.
So something like:
ll | grep "pattern" | sed 's/this/that/' | mpc
does not work for me, nor
ll | grep "pattern" | sed 's/this/that/' | mpc -
This
MPCTMP=`ll | grep "pattern" | sed 's/this/that/'` && echo $MPCTMP
works as expected, but this:
MPCTMP=`ll | grep "pattern" | sed 's/this/that/'` && mpc $MPCTMP
does not return results, var开发者_JAVA技巧iable is not understood but this program
I'm new to Linux and could not find anything searching with Google
Thanks
Try xargs
ll | grep "pattern" | sed 's/this/that/' | xargs mpc
精彩评论