From cfcba38a04e4e64e3b5f7637a9973b18aa604b95 Mon Sep 17 00:00:00 2001 From: Cem Keylan Date: Tue, 12 May 2020 00:07:52 +0300 Subject: busybox: add new utilities --- core/busybox/files/which | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 core/busybox/files/which (limited to 'core/busybox/files/which') 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 \n' "${0##*/}"; exit 0;} +IFS=:; for path in $PATH; do [ -x "$path/$1" ] && { printf '%s\n' "$path/$1"; exit 0;}; done +exit 1 -- cgit v1.2.3