I am setting an environment variable in my terminal with no value.
setenv ABC
Now I want to check in my bash script if this variable is set or not.
#!/bin/bash
ABC_USAGE=0
if [[ -z "$ABC" ]] ; then
ABC_USAGE=$((ABC_USAGE+1))
fi
echo $ABC_USAGE
I want to increase $ABC_USUAGE value only if $ABC is set in terminal without any value. My code is increasing this value anyway. which is not expected result. please help..