#!/bin/sh if [ "$1" = "" ]; then echo "Must supply parameters" exit 3 fi oldIFS="$IFS" IFS=: for i in $PATH; do if [ -e $i/$1 ]; then executable="$i/$1" break fi done if [ "$executable" = "" ]; then echo "$1 not found in path" 1>&2 exit 3 fi IFS="$oldIFS" shift wine "$executable" "$@"