From 68a07bf03b7624c9924065cce9ffa45497225834 Mon Sep 17 00:00:00 2001 From: Akinori Ito Date: Thu, 8 Nov 2001 05:14:08 +0000 Subject: Initial revision --- which | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 which (limited to 'which') diff --git a/which b/which new file mode 100755 index 0000000..473c891 --- /dev/null +++ b/which @@ -0,0 +1,11 @@ +#!/bin/sh +arg=$1 +for d in `echo $PATH | sed -e 's/:/ /g'` +do + if [ -x $d/$arg ]; then + echo $d/$arg + exit 0 + fi +done +echo "${arg}: Command not found." +exit 1 -- cgit v1.2.3