diff options
author | Cem Keylan <cem@ckyln.com> | 2020-05-12 00:07:52 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2020-05-12 00:07:52 +0300 |
commit | cfcba38a04e4e64e3b5f7637a9973b18aa604b95 (patch) | |
tree | 1432eec754edff09561760c716c3bedd6f19a388 /core/busybox/files/which | |
parent | 3709b835d2b5d90dc1e8da9ffd872e2c67bdbc7b (diff) | |
download | repository-cfcba38a04e4e64e3b5f7637a9973b18aa604b95.tar.gz |
busybox: add new utilities
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 |