-
-
Save AlexDaniel/62a02ee7c322f2ca832a688339ac76c0 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
files=0 | |
executable=0 | |
shebanged=0 | |
shopt -s globstar | |
for f in **/*.{p6,pl6,pl}; do | |
((files++)) | |
[[ -x "$f" ]] && ((executable++)) | |
[[ "$(head -n1 "$f")" == "#!"* ]] && ((shebanged++)) | |
done | |
echo "Total files: $files" | |
echo "Executable: $executable" | |
echo "With a shebang: $shebanged" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment