Reputation: 1651
I am trying to get the anaconda version here, when I run conda list anaconda
I get the following result:
I want to be able to get the value 2019.10, I am not aware how to do so, I tried to get the type of conda list anaconda to know even how to deal with it, but I get error. Is there a way I can get the version which is 2019.10
here?
Upvotes: 1
Views: 444
Reputation: 77090
If you just want that string then:
conda list '^anaconda$' | tail -n1 | tr -s' ' | cut -f2 -d' '
or maybe more robust
conda list -e '^anaconda$' | awk -F'=' '!/^#/ {print $2}'
Upvotes: 1