[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: Thu, 19 Aug 2010 09:39:04 -0700 (PDT)

Eric Blake-3 wrote:
> On 08/18/2010 11:58 AM, Eric Blake wrote:
>>> printf: 1: usage: printf format [arg ...]
>> And dash's /bin/sh does NOT have $RANDOM, so you ended up doing the same
>> as esyscmd(`printf ').
> [I hit send too soon; here's some clarifications]
> dash does not own /bin/sh.  What I meant was:
> esyscmd uses /bin/sh (unless you specified differently at ./configure
> time); dash does not have $RANDOM; therefore, if dash is installed as
> /bin/sh, then esyscmd invokes a shell that does not have $RANDOM, and an
> undefined unquoted variable is elided, so you ended up doing the same as
> esyscmd(`printf ').
>> But if you are intending to stick with `' quoting, then use:
>> esyscmd(`/bin/bash -c "\"$RANDOM\""')
> esyscmd(`/bin/bash -c "printf \"$RANDOM\""')
> -- 
> Eric Blake   address@hidden    +1-801-349-2682
> Libvirt virtualization library http://libvirt.org

Thanks so much for the help, that was it.

I've never done much shell calls inside of M4, but I have with PERL
scripting, never had any problems before.

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]