特别感谢原创者: devel
-------------------------------------------------
代码:
#!/usr/local/bin/bash
#date:2003/10/1
mount /mnt/d 2>/dev/null #suppress error message
#touch /mnt/d/media/test0 2>/dev/null 。
#mv -rf `find / -name *.` /mnt/d/media/test0
a=`pwd`
cd /mnt/d/media/good/
while true
do
echo "input music name: (will exit if you enter e ! )"
read name
if [ $name = "e" ] ; then echo "The process will exit !";cd $a;exit 0;fi
r=`echo $name|rev|cut -c1-2|rev`
m=`echo $name|rev|cut -c1-3|rev`
if [[ $r = "rm" || $m = "mp3" ]];then
if [ -r $name ];then
$name
echo "music already played complete !";sleep 3
else echo "Good bye ! Dear This music can not read ! You can play next time !"
fi
else echo "Can not support this type !";fi
done
阅读(1303) | 评论(0) | 转发(0) |