m4-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: random number generator


From: mikeyzman
Subject: Re: random number generator
Date: Wed, 18 Aug 2010 14:08:51 -0700 (PDT)



Eric Blake-3 wrote:
> 
> On 08/18/2010 01:13 PM, mikeyzman wrote:
>> Anyway, I'm not getting any echo back of the random number call, but the
>> good news is M4 seems to be expanding without errors, I'm probably just
>> missing an argument or something.
>> 
>> define(`number',`esyscmd(`/bin/bash -c "printf \"$RANDOM\""')')dnl
> 
> It worked for me:
> 
> $ m4
> define(`number',`esyscmd(`/bin/bash -c "printf \"$RANDOM\""')')dnl
> number
> 24246
> number
> 4597
> number
> 17644
> 
>> 
>> The above is ultimately what Im trying to do, but when I include this and
>> then type 'number', I don't see any output.   BTW this is command line
>> mode
>> for M4.   What I'm doing is invoking M4 command line style and then
>> "include(`myinclude')" where myinclude has the above definition.  I
>> should
>> then be able to type number and get a number kicked back.   But what else
>> am
>> I missing? 
> 
> One other thing to try is m4's debugmode; 'm4 -daeqt' can prove rather
> invaluable for tracing every single macro call.
> 
> -- 
> Eric Blake   address@hidden    +1-801-349-2682
> Libvirt virtualization library http://libvirt.org
> 
> 
>  
> 


Ghaaa, it works in Cygwin but not in Ubuntu.  I'll have to pursue this in
the ubuntu forums.  Im going to try an uninstall and re-install of M4, see
what happens.  Maybe there's some library missing..


Thanks so much for your help.
-- 
View this message in context: 
http://old.nabble.com/random-number-generator-tp29473901p29476042.html
Sent from the Gnu - M4 - Discuss mailing list archive at Nabble.com.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]