Created
December 19, 2019 18:27
-
-
Save peeyushsrj/87f90919e489994572eafaf75c10c9d5 to your computer and use it in GitHub Desktop.
Count function call python using bash
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
source="*.py" | |
funcs=$(cat $source | grep 'def' | sed 's/def //g' | sed 's/(.*/(/' | grep -v '#') | |
for f in $funcs | |
do | |
echo $f $(expr $(cat $source | grep -c $f) - 1) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment