Skip to content

Instantly share code, notes, and snippets.

@rmetzger
Created December 10, 2015 10:44
Show Gist options
  • Save rmetzger/4cd0a3cbd5761b9ae5e2 to your computer and use it in GitHub Desktop.
Save rmetzger/4cd0a3cbd5761b9ae5e2 to your computer and use it in GitHub Desktop.
Find Guava
#!/bin/sh
for file in `find . | grep "\.jar" `; do
echo "file $file"
COUNT=`jar tf $file | grep '^com/google/common' | wc -l`
if [ $COUNT != "0" ]; then
echo "FOUND IN FILE $file"
fi
done
for file in `find . | grep "pom.xml" `; do
echo "file $file"
COUNT=`cat $file | grep 'guava' | wc -l`
if [ $COUNT != "0" ]; then
echo "FOUND IN FILE $file"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment