You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openwrt-cghmn-mt300n/scripts/command_all.sh

12 lines
245 B

#! /bin/sh
# SPDX-License-Identifier: GPL-2.0-or-later
# Reduced version of which -a using command utility
case $PATH in
(*[!:]:) PATH="$PATH:" ;;
esac
for ELEMENT in $(echo $PATH | tr ":" "\n"); do
PATH=$ELEMENT command -v "$@"
done