2017-12-27 18:07:32 +01:00
|
|
|
#! /bin/sh
|
2018-03-02 18:03:40 +01:00
|
|
|
cd /home/trotfunky/Documents/Sounds/Startup/
|
|
|
|
qty=$(ls | grep -c "" )
|
2017-12-27 18:07:32 +01:00
|
|
|
|
2018-03-02 18:03:40 +01:00
|
|
|
if [ $qty -lt 10 ]; then
|
|
|
|
maxBit=1
|
|
|
|
diGrep=[[:digit:]]
|
|
|
|
elif [ $qty -lt 100]; then
|
|
|
|
maxBit=2
|
|
|
|
diGrep=[[:digit:]][[:digit:]]
|
|
|
|
fi
|
|
|
|
|
|
|
|
mplayer -nogui -softvol -ao alsa,pulse $(expr $(strings /dev/urandom | cut -b 1-$maxBit | grep $diGrep -m 1 ) % $qty )* &
|
|
|
|
cd -
|
2017-12-27 18:07:32 +01:00
|
|
|
|
|
|
|
exit 0
|