Created
September 17, 2022 21:58
-
-
Save socketbox/d4bdb1c3c5f282351c451cfcb6102f10 to your computer and use it in GitHub Desktop.
Use grep and awk to delete multiple pyenv envs matching a pattern
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
for foo in $(pyenv virtualenvs | grep --color=NEVER "^\s\sk" | awk -F" " '{print $1}'); | |
do | |
pyenv virtualenv-delete -f $foo; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment