NAME= ${MYVAR%:*} # retain the part before the colon NAME= ${NAME##*/} # retain the part after the last slash ${MYVAR#pattern} # delete shortest match of pattern from the beginning ${MYVAR##pattern} # delete longest match of pattern from the beginning ${MYVAR%pattern} # delete shortest match of pattern from the end ${MYVAR%%pattern} # delete longest match of pattern from the end So # means match from the beginning (think of a comment line) and % means from the end. One instance means shortest and two instances means longest. ${MYVAR:3} # Remove the first three chars (leaving 4..end) ${MYVAR::3} # Return the first three characters ${MYVAR:3:5} # The next five characters after removing the first 3 (chars 4-9) ${MYVAR/search/replace}
pip install pip - autoremove pip - autoremove pkgname src http://stackoverflow.com/questions/7915998/ddg#27713702 cat .config/pip/pip.conf [global] break-system-packages = true upgrade all pip freeze --user | cut -d'=' -f1 | xargs -n1 pip install --user --upgrade