On Tue, Jun 10, 2008 at 6:21 PM, Alan_Chun <[EMAIL PROTECTED]> wrote: > > Hi, any one know how to execute a command, e.g, "stty 9600 -F /dev/ttyS0" > under mono C#? > > string cmd = "stty 9600 -F /dev/ttyS0" ; > System.Diagnostics.Process proc = new System.Diagnostics.Process(); > proc.StartInfo.FileName = ??? //here > proc.StartInfo.Arguments = cmd; ////?????? > proc.StartInfo.UseShellExecute = false; ///???? > proc.StartInfo.RedirectStandardOutput = true; > proc.Start();
Pass your shell command to a shell such as sh or bash: Filename: "sh" (or "bash") Arguments: "-c ' " + your_escaped_command + " ' " -- Michael Hutchinson http://mjhutchinson.com _______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list