minus-squareBillibusMaximus@sh.itjust.workstoLinux@lemmy.ml•Check two conditions in bash ? [solved]linkfedilinkarrow-up0·4 months agoIf you want true for empty strings, you want -z not -n if [[ -z "VARIABLE1" && -z "VARIABLE2" ]]; then echo "OK" fi linkfedilink
If you want true for empty strings, you want -z not -n
if [[ -z "VARIABLE1" && -z "VARIABLE2" ]]; then echo "OK" fi