[Top][All Lists]

[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 12:13:55 -0700 (PDT)

Eric Blake-3 wrote:
> On 08/18/2010 11:58 AM, Eric Blake wrote:
> esyscmd(`/bin/bash -c "printf \"$RANDOM\""')

OK I get the shell thing, and you're right, I checked for my own
edification, ubuntu defaults to dash.   strange though any terminal I pull
up, if I do an "env" it says SHELL is bash.  But that probably goes back to
what you were saying about SHELL.  

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

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? 

Thanks for your patience, I'm a novice linux guy, but once I get up and
running in M4 I can get around through empirical experimentation.
View this message in context: 
Sent from the Gnu - M4 - Discuss mailing list archive at Nabble.com.

reply via email to

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