[Mono-osx] Calling ls with wildcards
maxi.combina at passwordbank.com
Wed Sep 14 09:13:08 EDT 2011
I think that the wildcard is interpreted by your shell.
When using ProcessStartInfo("ls", "/dev/*"), you are actually requiring an
"ls" on the file "/dev/*" :)
2011/9/14 Andrew Ayre <andy at britishideas.com>
> The following fills the result string with a list of items in /dev:
> ProcessStartInfo EnumProcessInfo = new ProcessStartInfo("ls", "/dev");
> EnumProcessInfo.CreateNoWindow = true;
> EnumProcessInfo.UseShellExecute = false;
> EnumProcessInfo.RedirectStandardOutput = true;
> Process EnumProcess = Process.Start(EnumProcessInfo);
> string Result = EnumProcess.StandardOutput.ReadToEnd();
> If I change the first line to the following then the result is empty:
> ProcessStartInfo EnumProcessInfo = new ProcessStartInfo("ls", "/dev/*");
> What am I doing wrong?
> I am using the current version of MonoMac and MonoDevelop (downloaded
> yesterday) on SnowLeopard.
> thanks, Andy
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
Cell:+1 408 300 3614
Tel: +1 408 524 1579
440 N. Wolfe Road. Sunnyvale. CA. 94085. USA
This message and its attachments are sent from PasswordBank, Inc. and may
contain information that is
confidential. If you are not the intended recipient, you are prohibited from
printing, copying, forwarding or
saving them. Please delete the message and attachments without printing,
copying, forwarding or saving
them, and notify the sender immediately. Message transmission is not
guaranteed to be secure.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-osx