Skip to content

Instantly share code, notes, and snippets.

@viviparous
Created July 6, 2015 02:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save viviparous/fe7ed083a2c11c1873de to your computer and use it in GitHub Desktop.
Save viviparous/fe7ed083a2c11c1873de to your computer and use it in GitHub Desktop.
linux: call bash script from find command; bash script runs perlcritic on each file found; output appended to file, separated by name of file examined
#! /bin/bash
#find lib/ -type f -name "*.pm" | while read file; do ./pcritic_shell.sh "$file"; done
OFILE=critic_out.txt
echo Process $1
echo "= = = = = = = =" >> $OFILE
echo "= = = = = = = =" >> $OFILE
echo `date` >> $OFILE
echo $1 >> $OFILE
perlcritic -1 $1 >> $OFILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment