|
我的脚本信息如下:
#!/bin/bash
if [ ! -n "$1" ] ; then
echo Err : You not appointed a file!
exit 0
fi
if [ ! -f "$1" ] ; then
echo "ERR:The $1 not exists or it's not a file"
exit 0
fi
adr=`sed -n "1p" $1`
Firstr=`expr substr $adr 1 4`
if [ ! -n "$adr" -o "$Firstr" != "mms:" ] ; then
echo " The $1 not has a correct mms address!"
exit 0
fi
#if [ "$Firstr" != "mms:" ] ; then
# echo "The $1 not has acorrect mms address!"
# echo "$Firstr"
# exit 0
#fi
echo " The mms address : $adr "
echo " mplayer will play it,please wait for a moment! "
mplayer $adr < /dev/null > /dev/null 2>1&
以上脚本执行完毕后就会在当前目录下创建一个名字为1的普通文件,不知道为什么? |
|