mailcapopener (246B)
1 #!/bin/sh 2 3 if [ $# -lt 1 ]; 4 then 5 printf "usage: %s URI\n" "$(basename "$0")" >&2 6 exit 1 7 fi 8 9 case "$1" in 10 file://*) 11 path="$(printf "%s\n" "$1" | cut -c 8-)" 12 ;; 13 *) 14 printf "URI should begin with 'file://'.\n" >&2 15 exit 1 16 ;; 17 esac 18 19 see "$path" 20