diff options
Diffstat (limited to 'core/busybox/files/which')
-rwxr-xr-x | core/busybox/files/which | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/busybox/files/which b/core/busybox/files/which new file mode 100755 index 00000000..76bf5c27 --- /dev/null +++ b/core/busybox/files/which @@ -0,0 +1,4 @@ +#!/bin/sh +[ "$1" ] || { printf 'usage: %s <command>\n' "${0##*/}"; exit 0;} +IFS=:; for path in $PATH; do [ -x "$path/$1" ] && { printf '%s\n' "$path/$1"; exit 0;}; done +exit 1 |