#!/bin/bash # determine number of files in /dconfs cd /etc/hildon-welcome.d/dconfs/ nof=$(ls *.conf | wc -l) # get random number rn=$(dd if=/dev/urandom count=1 2> /dev/null | cksum | cut -f1 -d" ") # in range of 1 - nof let "rr = $rn % $nof + 1" # choose random conf rf="$rr.conf" echo "$rr.conf" # copy it over to default.conf cp $rf ../default.conf # exit exit 0