# Variant of which(1) that shows all potential commands in the order
# found in PATH.  Shows an ls -l listing for each of them.
wh ()
{
  tmpfile=/tmp/`basename $0`.$$
  (for j in $*; do
    for i in `echo $PATH|sed 's/:/ /g'`; do
      if [ -f $i/$j ]; then
        echo $i/$j
      fi
    done
  done) >$tmpfile
  if [ -s $tmpfile ]; then
  # GNU ls treats -lf and -fl differently
    xargs <$tmpfile ls -fli
  else
    echo No files found
  fi
  rm $tmpfile
}
