GDC2 [Re: GDC2 compilation warnings]

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Nov 24 11:09:26 PST 2010


On 11/24/10 12:56 PM, Graham Fawcett wrote:
> On Wed, 24 Nov 2010 18:49:23 +0000, Iain Buclaw wrote:
>
>> == Quote from Graham Fawcett (fawcett at uwindsor.ca)'s article
>>> $ find /usr/include/d/dmd/ | xargs grep "RAND_MAX.*="
>>> /usr/include/d/dmd/druntime/import/core/stdc/stdlib.di:    enum
>>> RAND_MAX = 32767;
>>> /usr/include/d/dmd/druntime/import/core/stdc/stdlib.d:enum RAND_MAX
>>> = 32767;
>>
>> Why the ugly pipe to xargs?
>>
>> grep -R "RAND_MAX.*=" /usr/include/d/dmd
>
> I knew someone was going to call me on that. :)
>
> I spend some time on Linux, and some on Solaris. While Solaris has
> "ggrep" which supports -R, the Solaris "grep" does not. By force of
> habit, I spell it "find/grep" to make scripts more portable.
>
> But it's a kludge. Kids, don't try this at home, "grep -R" is
> definitely your friend. :)
>
> I hear that "ack" is also nice, though I don't know if it supports D
> sources out of the box. (ack: http://betterthangrep.com/)
>
> Best,
> Graham

You guys should use zsh.

grep "RAND_MAX.*=" /usr/include/d/dmd/**/*


Andrei


More information about the Digitalmars-d mailing list