Colin Watson writes: >Perhaps just: > > tmp=$d/eqn2graph$${$RANDOM:+-$RANDOM} > >then?
Since it's not guaranteed to be present, why not just ignore $RANDOM and use our own randomly generated integer instead? Something like: groff_rand=$(dd if=/dev/urandom bs=8 count=1 2>/dev/null | sum | sed 's/^0*//;s/ .*//') tmp="$d/eqn2graph$groff_rand" should work and be portable. I think pretty much everywhere supports /dev/urandom, right? If not we could use /dev/random with the minimal chance of it blocking. Tet