Last active
August 22, 2016 20:30
-
-
Save Daniel-M/006c76761735ae114d79d704c7a80e59 to your computer and use it in GitHub Desktop.
Update all installed packages installed via pip and pip3 in Debian
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Simplified forms using awk | |
pip install --upgrade $(pip list | awk '{printf(" %s ",$1)}') | |
pip3 install --upgrade $(pip3 list | awk '{printf(" %s ",$1)}') | |
# Alternative forms using sed | |
#pip install --upgrade $(pip list | awk -F" " '{print $1}' | sed ':a;N;s/\n/ /g;ba') # Alternative form | |
#pip3 install --upgrade $(pip3 list | awk -F" " '{print $1}' | sed ':a;N;s/\n/ /g;ba') # Alternative form |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment