pick a pic -- script to set random background
# pickapic: pick a random background
cd /usr/local/bin
lines=`wc -l backgrounds`
cnt=`echo $lines | awk '{print $1}'`
XX=$(( $RANDOM % $cnt ))
echo "$XX"p > /tmp/pick-line-X
cat backgrounds|sed -n -f /tmp/pick-line-X > /tmp/line-X
Esetroot -s `cat /tmp/line-X`
rm -f /tmp/line-X /tmp/pick-line-X
cd /usr/local/bin
lines=`wc -l backgrounds`
cnt=`echo $lines | awk '{print $1}'`
XX=$(( $RANDOM % $cnt ))
echo "$XX"p > /tmp/pick-line-X
cat backgrounds|sed -n -f /tmp/pick-line-X > /tmp/line-X
Esetroot -s `cat /tmp/line-X`
rm -f /tmp/line-X /tmp/pick-line-X

