Created
March 2, 2020 20:42
-
-
Save buffet/e9e0b04e5c989e72ab560e087c92e983 to your computer and use it in GitHub Desktop.
compgen.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
IFS=:; for dir in $PATH; do | |
for file in "$dir"/*; do | |
if test -f "$file" -a -x "$file"; then | |
printf '%s\n' "${file##*/}" | |
fi | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment