2011-09-11 74 views
1

對於大多數Unix shell中,我們可以使用管道的權力和cat命令來連接,如下面的例子非文本數據:殼管道和貓命令在Windows

a_command_with_binary_output | cat - this_is_a_binary_file > output_file 

是什麼在Windows中相當於上面的命令?我只針對command.com或cmd.exe。請沒有PowerShell。

回答

1

那麼,如果你能抽出空來臨時空間:

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

但請你幫個忙,並獲得coreutils for Win32。其中包含cat和一些其他方便的實用程序。