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

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