下面是一段shell脚本拷贝到path 路径下运行即可,原版本来自何勃亮,我增加了提示功能方便输入.
#! /bin/sh
case $1 in
cctv0 ) mplayer mms://live.cctv.com/livenews > /dev/null & ;;
cctv1 ) mplayer mms://live.cctv.com/live11 > /dev/null & ;;
cctv2 ) mplayer mms://live.cctv.com/live12 > /dev/null & ;;
cctv3 ) mplayer mms://live.cctv.com/live13 > /dev/null & ;;
cctv4 ) mplayer mms://live.cctv.com/live14 > /dev/null & ;;
cctv10 ) mplayer mms://live.cctv.com/live20 > /dev/null & ;;
phtv0 ) mplayer mms://222.47.29.116/litv01 > /dev/null & ;;
phtv1 ) mplayer mms://222.47.29.116/litv03 > /dev/null & ;;
*) echo "please enter 'tv cctv0'[cctv1 cctv2 cctv3 cctv4 cctv10 phtv0 phtv1] to select differrnt tv channel"
esac