#!/bin/sh exec >/tmp/open.out 2>&1 set -x cmd=xdg-open case $1 in (*.mkv|*.mp4) cmd=vlc;; esac exec $cmd "$@"