Last active
November 13, 2018 11:01
-
-
Save papachristoumarios/f184d95f0d7ef3f7e5888e2478be4085 to your computer and use it in GitHub Desktop.
Common Identifiers in Souce Code Files
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
#!/bin/bash | |
# Find common identifiers in .c and .h files | |
# Author: Marios Papachristou | |
# Usage: ./common_identifiers.sh 1000 >most_common.txt | |
find . -type f -name "*.[c\|h]" | | |
xargs cat | | |
tr -c 'A-Za-z' \\n | | |
sort | | |
uniq -c | | |
sort -rn | | |
head -$1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment