using System.Diagnostics; using System.IO; 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; process.Start(); process.WaitForExit(); var output = process.StandardOutput.ReadToEnd(); File.WriteAllText("out", output); process.StartInfo.FileName = "cat"; process.StartInfo.Arguments = "out"; process.StartInfo.RedirectStandardOutput = false; process.Start(); process.WaitForExit(); } }