Re: random number generator
mikeyzman <[email protected]>
| Newsgroups | gmane.comp.gnu.m4.general |
|---|---|
| Message-ID | <[email protected]> |
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: http://old.nabble.com/random-number-generator-tp29473901p29475003.html Sent from the Gnu - M4 - Discuss mailing list archive at Nabble.com.