每隔一段时间播放一段音乐的shell该怎么写呢?
发表于 : 2011-10-04 16:53
我想通过一个这样的shell来提醒我定时休息,不知道shell里面该怎么用时间控制。谢谢各位。
代码: 全选
#!/bin/sh
while true
do
mplayer /media/F/My\ Music/嘀嗒.mp3
sleep 30s
done
代码: 全选
● type atmsg
atmsg 是一个函数
atmsg ()
{
echo msg "clock.png" "AT定时" "$2" | at "now + $1 minutes"
}
2011-10-04 21:27:28 二 ~/bin
● type atosd
atosd 是一个函数
atosd ()
{
echo DISPLAY=:0.0 osdanimationtxt.pl $2 | at "now + $1 minutes"
}
2011-10-04 21:27:48 二 ~/bin
● type atpng
atpng 是一个函数
atpng ()
{
echo DISPLAY=:0.0 show_png.pl $2 | at "now + $1 minutes"
}