1 2 3 4 5 6 7 8 9 10 11
#!/bin/sh exec >/tmp/open.out 2>&1 set -x cmd=xdg-open case $1 in (*.mkv|*.mp4) cmd=vlc;; esac exec $cmd "$@"