开发者

Pipe to command that does not accept piping

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜