wrap3m (450B)
1 #!/bin/sh 2 3 HOMEPAGE=http://ei5nazha.yz.yamagata-u.ac.jp/~aito/w3m/ 4 OPT="" 5 URL="" 6 for i in $@ 7 do 8 case $i in 9 -*) 10 OPT="$OPT $i" 11 ;; 12 *) 13 URL="$URL $i" 14 ;; 15 esac 16 done 17 18 if [ -z "$URL" ]; then 19 URL=$HOMEPAGE 20 fi 21 URLARG="" 22 for u in $URL 23 do 24 if [ `expr $u : '[a-z][a-z]*://'` -gt 0 ]; then 25 URLARG="$URLARG $u" 26 elif [ -f $u -o -d $u ]; then 27 URLARG="$URLARG $u" 28 else 29 URLARG="$URLARG http://$u" 30 fi 31 done 32 33 w3m $OPTS $URLARG