[Mono-list] Capturing output from Linux Command Line programs

Chris Aitken chris at ion-dreams.com
Tue Aug 16 08:20:40 EDT 2005


Tracy,

If you need help with this, shout (I wrote it).

> public class GACReader
> {
>         private static void Main()
>         {
>                 System.Diagnostics.Process GACRead;
> 
>                 GACRead = new System.Diagnostics.Process();
>                 GACRead.StartInfo.FileName = "gacutil";
>                 GACRead.StartInfo.Arguments = " -l | grep Version=1";
>                 GACRead.StartInfo.UseShellExecute = true;
>                 GACRead.StartInfo.RedirectStandardOutput = false;
>                 GACRead.Start();
> 
>                 contents = GACRead.StandardOutput.ReadToEnd();
> 
>                 GACRead.WaitForExit();
>                 GACRead.Close();
>         }
>         
> }


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the Mono-list mailing list