Modifié pour avoir un son aléatoire. Et oui, c'est débile!
This commit is contained in:
parent
3012af9c19
commit
1a2e64daed
1 changed files with 12 additions and 1 deletions
|
@ -1,5 +1,16 @@
|
|||
#! /bin/sh
|
||||
cd /home/trotfunky/Documents/Sounds/Startup/
|
||||
qty=$(ls | grep -c "" )
|
||||
|
||||
mplayer -nogui -softvol -ao alsa,pulse /home/trotfunky/Documents/Sounds/winxp.mp3 &
|
||||
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 -
|
||||
|
||||
exit 0
|
Loading…
Add table
Reference in a new issue