[Mono-osx] Calling ls with wildcards

Maxi Combina 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/*" :)

Maxi

2011/9/14 Andrew Ayre <andy at britishideas.com>

> Hi,
>
> 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();
> EnumProcess.WaitForExit();
> EnumProcess.Close();
>
> 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
> http://lists.ximian.com/mailman/listinfo/mono-osx
>



-- 
*Maxi Combina*
Cell:+1 408 300 3614
Tel:  +1 408 524 1579
440 N. Wolfe Road. Sunnyvale. CA. 94085. USA

<http://www.passwordbank.com/>www.PasswordBank.com<http://www.passwordbank.com/>
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...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20110914/2271873c/attachment.html 


More information about the Mono-osx mailing list