Created
January 24, 2025 10:26
-
-
Save gerritjvv/b5f7c65aaf828417ba9ff652d196f565 to your computer and use it in GitHub Desktop.
linecount.sh
This file contains hidden or 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 | |
# | |
# Example usage: | |
# ./linecount.sh . java | |
# > 4000 total | |
# | |
DIR="$1" | |
EXT="$2" | |
find ${DIR} -iname "*.$EXT" -exec wc -l {} + | tail -n1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Count lines in files with a specific extension