Created
January 7, 2015 15:59
-
-
Save forthxu/c72f3c614e8d2be62676 to your computer and use it in GitHub Desktop.
晚安版
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
musics_dir='/workspace/work/other/mp3/'; | |
j=0; | |
musics=(); | |
for file in $(ls ${musics_dir});do | |
musics[$j]=$file; | |
let "j+=1"; | |
done | |
musics_length=${#musics[@]}; | |
for ((i=0; i<3; i++));do | |
x=`expr $RANDOM % $musics_length`; | |
#echo $x; | |
mplayer ${musics_dir}${musics[$x]}; | |
sleep 5s; | |
espeak -vzh "主人,该去睡叫勒,不然起不来"; | |
sleep 1m; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment