B R wrote:
> Noob question here:
>
> I want to pipe the output from "rpm -i --test *.rpm" into a text file for
> parsing (looking at mono dependencies). How would I go about doing that?
> Thanks
using System;
using System.Diagnostics;
class Test
{
public static void Main ()
{
ProcessStartInfo psi = new ProcessStartInfo ();
psi.FileName = "rpm";
psi.Arguments = "-i --test *.rpm";
psi.RedirectStandardOutput = true;
psi.UseShellExecute = false;
Process p = Process.Start (psi);
string ret = p.StandardOutput.ReadToEnd ();
p.WaitForExit ();
Console.WriteLine (ret);
}
}
Robert
_______________________________________________
Mono-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list