pkgsrc-wip/which/files/which.bash
Jeremy C. Reed 7ece818ae2 Import a which command. (I needed this for my Linux!)
The which tool is used to locate a program file in the user's PATH.

This which code is from NetBSD's whereis.c and originally from 3.0BSD.
2004-05-23 04:05:15 +00:00

5 lines
94 B
Bash

#!/bin/bash
unalias -a
unset -- "$@" &> /dev/null
enable -n -- "$@" &> /dev/null
type -p "$@"