I found this line in a bash script:
if [[ -z "$VIRTUAL_ENV" ]]; then
source ./env/bin/activate
fi
I was wondering what it meant?
(I hope that's not a duplicate question, but it's very hard to google bash commands as they're single letters)
I found this line in a bash script:
if [[ -z "$VIRTUAL_ENV" ]]; then
source ./env/bin/activate
fi
I was wondering what it meant?
(I hope that's not a duplicate question, but it's very hard to google bash commands as they're single letters)
From man test
(link)
It checks whether the string is zero length. In bash there is no distinction between null and empty string, so also returns true if the string has not been set.