#!/bin/bash WALLPAPEROPTS="-s" WALLPAPERPROG="Esetroot" WALLPAPERDIRS="/root/.enlightenment/backgrounds /home/httpd/htdocs/neatpics/women/ /home/httpd/htdocs/neatpics/LinuxChicks/ " WALLPAPERCOUNT=0 for dir in ${WALLPAPERDIRS} ; do tmpcnt=`ls ${dir} | wc -l` WALLPAPERCOUNT=`expr ${WALLPAPERCOUNT} + ${tmpcnt}` done WP=`expr ${RANDOM} % ${WALLPAPERCOUNT}` ${WALLPAPERPROG} ${WALLPAPEROPTS} `find ${WALLPAPERDIRS} -maxdepth 1 -type f | cut -d$'\n' -f ${WP}`