pip3 list

pip3 list --outdated --format columns au lieu de pip3 list --outdated —freeze
This commit is contained in:
2018-03-17 07:51:39 +01:00
parent e9db6f187d
commit 53a4c396a5

14
_pip.sh
View File

@@ -13,14 +13,22 @@ pip3 install --upgrade pip
#pip3 install --upgrade mkdocs-material #pip3 install --upgrade mkdocs-material
echo "" echo ""
pip3_outdated=$(pip3 list --outdated --format=freeze) pip3_outdated=$(pip3 list --outdated --format columns)
upd3=$(echo $pip3_outdated | tr [:space:] '\n' | awk -F== '{print $1}') upd3=$(echo "$pip3_outdated" | sed '1,2d' | awk '{print $1}')
#echo $upd3
pip3_outdated_freeze=$(pip3 list --outdated --format=freeze)
#upd3=$(echo $pip3_outdated_freeze | tr [:space:] '\n' | awk -F== '{print $1}')
if [ -n "$upd3" ]; then if [ -n "$upd3" ]; then
echo -e "\033[4mAvailables updates:\033[0m" echo -e "\033[4mAvailables updates:\033[0m"
echo $pip3_outdated | tr [:space:] '\n' #echo $pip3_outdated_freeze | tr [:space:] '\n'
echo "$pip3_outdated"
echo "" echo ""
#echo "$pip3_outdated" | sed '1,2d' | awk '{print $1}'
#echo ""
a=$(echo -e "Do you wanna run \033[1mpip3 install --upgrade "$upd3"\033[0m ? (y/n)") a=$(echo -e "Do you wanna run \033[1mpip3 install --upgrade "$upd3"\033[0m ? (y/n)")
read -p "$a" choice read -p "$a" choice