Skip to content

Instantly share code, notes, and snippets.

@sdalichampt
Created June 12, 2014 13:52
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 sdalichampt/5d8b183dfedc051637af to your computer and use it in GitHub Desktop.
Save sdalichampt/5d8b183dfedc051637af to your computer and use it in GitHub Desktop.
Recherche la liste des properties non utilisées dans le projet
#!/bin/sh
fichierProperties=$1
repertoireBaseProjet=$2
fichierRapport=$3
while read line
do
key=${line%%[ =]*}
if [ -n "$key" ]
then
nb=`find $repertoireBaseProjet -name "*.jsp" -o -name "*.xml" -o -name "*.java" | xargs -l10 grep $key | wc -l`
if [ $nb -eq 0 ]
then
echo $key
fi
fi
done < $fichierProperties | tee -a $fichierRapport
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment