[Mono-list] Problem with System.Diagnostics.Process and cat

snorkel01 support at amsoftwaredesign.com
Mon Jun 23 13:00:33 EDT 2008


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

I have verfied that this is indeed what the process is getting for
arguments.

The process runs and I get this back in standard error:

/bin/cat: >: No such file or directory /bin/cat:
/1001/temp/admsfx_23847.exe: No such file or directory 

It seems it's hitting the > and crapping out If I take the arguments and run
them manuall from a terminal the command works fine.  I also tried putting
the argument elements in qoutes and that didn't help.

Any ideas?

Thanks,

Snorkel




-- 
View this message in context: http://www.nabble.com/Problem-with-System.Diagnostics.Process-and-cat-tp18073509p18073509.html
Sent from the Mono - General mailing list archive at Nabble.com.



More information about the Mono-list mailing list