Useful CLI tools (bash) for Arch Linux administration
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.

15 lines
302 B

3 years ago
  1. #!/bin/env sh
  2. if [[ ${1} == "-h" ]] || [[ ${1} == "--help" ]] || [[ -z ${1} ]]; then
  3. echo "
  4. Find available commands in PATH by input syntax.
  5. Usage: $(basename $0) <command syntax>
  6. "
  7. exit 0
  8. fi
  9. PATHS=($(echo "${PATH}" | sed 's/:/ /g') )
  10. for p in ${PATHS[@]}; do
  11. find "${p}" -iname "*${1}*"
  12. done