snorkel01 wrote:
> Hi,
> I am trying to use System.Diagnostics.Process and the Unix cat command to
> concatentate two files and I can't seemt to get it to work.
>
> myStartInfo.FileName = "cat";
> myStartInfo.Arguments = string.Format("{0} {1} > {2}", newSFXstub,
> zipfilename, newSFXFilename);
>
> The arguments in this case are:
> /1001/temp/admstub_23849.exe/1001/temp/miadm_23849.zip >
> /1001/temp/admsfx_23849.exe
You need a shell for stream redirection:
string cmd = String.Format("{0} {1} > {2}", newSFXstub, zipfilename,
newSFXFilename);
myStartInfo.FileName = "/bin/sh";
myStartInfo.Arguments = String.Format("-c \"{0}\"", cmd);
Robert
_______________________________________________
Mono-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list