对于大多数Unix shell,我们可以使用pipe和cat命令来连接非文本数据,如下例所示:
a_command_with_binary_output | cat - this_is_a_binary_file > output_file
Windows中的上述命令的等效参数是什么? 我只是针对command.com或cmd.exe。 请没有PowerShell。
那么如果你能腾出临时空间:
a_command_with_binary_output > temp_file copy /B temp_file + this_is_a_binary_file output_file del temp_file
但是请帮个忙, 为Win32获取coreutils 。 这包含cat
和一些其他方便的实用程序。