[Mono-osx] Calling ls with wildcards

Bojan Rajkovic brajkovic at coderinserepeat.com
Wed Sep 14 09:36:00 EDT 2011


On Sep 14, 2011, at 9:26 AM, Andrew Ayre wrote:

> Thanks for the hint Maxi. What is the right way to do what I want?
> Ultimately I want to get a subset of items that are in /dev:
> 
> ls /dev/tty.*
> 
> thanks, Andy
> 
> On 9/14/2011 2:13 PM, Maxi Combina wrote:
>> 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
> 
> -- 
> Andy
> PGP Key ID: 0xDC1B5864
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx

Why not just use Directory.GetFiles()? It has a wildcard-capable parameter that you can use to get all the tty* files in /dev/.

—Bojan


More information about the Mono-osx mailing list