
4 Jun
2009
4 Jun
'09
10:39 p.m.
On Thu, 4 Jun 2009 17:55:36 -0400
Gwern Branwen
Sure, but then he'd need to scale it. $RANDOM outputs between 0 and 32767, not 0-100. .......
-------------------------8<------------------------- #!/bin/bash R_BASE=32768 G_BASE=32768 B_BASE=32768 `printf "xterm -bg rgb:%04x/%04x/%04x\n" $(($R_BASE+$RANDOM)) $(($G_BASE+$RANDOM)) $(($B_BASE+$RANDOM))` -------------------------8<------------------------- (the last expression must be on the single line, of course) Cheers, Sergey