开发者

shell piping and the cat command... on Windows

With most Unix shells, we can use the powers of pipe and the cat command to concatenate non-text data like the following example:

a_command_with_binary_output | cat - this_is_a_binary_file > output_file

What is the equivalent of the above command in Windows? I'm only target开发者_StackOverflow社区ing command.com or cmd.exe. No powershell please.


Well if you can spare the temporary space:

a_command_with_binary_output > temp_file
copy /B temp_file + this_is_a_binary_file output_file
del temp_file

But do yourself a favor and get coreutils for Win32. That contains cat and a bunch of other handy utilities.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜