diff options
Diffstat (limited to 'src/tools/perlcheck/find_perl_files')
-rw-r--r-- | src/tools/perlcheck/find_perl_files | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tools/perlcheck/find_perl_files b/src/tools/perlcheck/find_perl_files new file mode 100644 index 0000000..fd99dab --- /dev/null +++ b/src/tools/perlcheck/find_perl_files @@ -0,0 +1,14 @@ +# src/tools/perlcheck/find_perl_files + +# shell function to find all perl files in the source tree + +find_perl_files () { + { + # take all .pl and .pm files + find . -type f -name '*.p[lm]' -print + # take executable files that file(1) thinks are perl files + find . -type f -perm -100 -exec file {} \; -print | + egrep -i ':.*perl[0-9]*\>' | + cut -d: -f1 + } | sort -u | grep -v '^\./\.git/' +} |