GDC2 [Re: GDC2 compilation warnings]
Graham Fawcett
fawcett at uwindsor.ca
Wed Nov 24 10:56:28 PST 2010
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
More information about the Digitalmars-d
mailing list