#!/bin/sh
# This is a replacement for the GNU which package for systems that don't have it installed.

if [ -z "$1" ]; then
  exit 1
fi
prog=""
path=`echo $PATH | sed s/:/" "/g`
for dir in $path
do
  tmp=`echo $dir/$1`
  if [ -x "$tmp" ]; then
    echo "$tmp"
    exit
  fi 
done
