Skip to content

Instantly share code, notes, and snippets.

@jaysonsantos
Created March 21, 2015 18:40
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 jaysonsantos/04a71ba9c008c8873090 to your computer and use it in GitHub Desktop.
Save jaysonsantos/04a71ba9c008c8873090 to your computer and use it in GitHub Desktop.
List only outdated pip packages that exists in local requirements
#!/bin/bash
pip list -o|while read i; do
pkg_name="$(echo $i | awk '{print $1}')"
grep -rin "$pkg_name" requirements/ &> /dev/null
if [ "$?" -eq "0" ]; then
echo $i
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment