using System.Diagnostics; using System.IO; using System.Threading; class Program { static void Main() { var process = new Process(); process.StartInfo.UseShellExecute = false; process.StartInfo.FileName = "echo"; process.StartInfo.Arguments = "Hello World!"; process.StartInfo.RedirectStandardOutput = true; if (process.Start()) Thread.Sleep(2000); process.WaitForExit(); var output = process.StandardOutput.ReadToEnd(); File.WriteAllText("out", output); process.StartInfo.FileName = "cat"; process.StartInfo.Arguments = "out"; process.StartInfo.RedirectStandardOutput = false; if (process.Start()) Thread.Sleep(1000); process.WaitForExit(); } }