Created
June 12, 2024 04:35
-
-
Save xtman/b9dd1c35c6f657867c46ce8c6cda18be to your computer and use it in GitHub Desktop.
count-files-in-dir.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 | |
[ $# -ne 1 ] && echo "$(basename $0) <dir>" && exit 1 | |
[ ! -d $1 ] && echo "$1 is not a directory." && exit 1 | |
find "$1" -type f | wc -l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment