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.
精彩评论