Code: export RAND_SEED=123456789 export RANDOM=${RAND_SEED} randomize() { RANDOM=$(( ${RANDOM} * ${RAND_SEED} % 4000000000 )) echo "**************${RANDOM}" >2 echo ${RANDOM} } If I run this by hand I get "unique" results, but if I x=$(randomize) 'randomize' is executed at most one time. Every subsequent call yields the previously derived value. Is this normal 'ash' behavior? This is being run on an i.MX6 ARM processor with a home-brew Linux distro.
Failed to reproduce it. Which version of busybox do you have?