下面是一段shell腳本拷貝到path 路徑下運行即可,原版本來自何勃亮,我增加了提示功能方便輸入。
#! /bin/sh
case {GetProperty(Content)} 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