command_all.sh 245 B

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