开发者

What does the following do: (some command) > file1 file2

开发者 https://www.devze.com 2023-03-29 03:23 出处:网络
I\'m re-writing an ancient and pretty broken build and ran across a rule with something in it I\'ve never seen before.It looks like this:

I'm re-writing an ancient and pretty broken build and ran across a rule with something in it I've never seen before. It looks like this:

%_ui.cc:
     ${SOME_UTILITY} ${*}
     sed '/\#include "${*}.h"/d' > tempstubs.cc ${*}_stubs.cc
     /bin/csh -c 'if (-w ${*}_stubs.cc ) cp -f tem开发者_如何学JAVApstubs.cc ${*}_stubs.cc'
     -rm -f tempstubs.cc

The sed line is the one I'm referring to. I've never seen a redirection like that with two files after the >.


Nevermind, figured it out. The sed line could've been re-written as:

sed 'do whatever' ${*}_stubs.cc > tempstubs.cc

... and appears to be semantically identical.

0

精彩评论

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