How write in if [ -z $str1 && -z $str2 ]
, "&&"
doesn't work, if write [ -z $str1 ]
this is work. I want to once two string
#!/bin/bash
echo "Enter first string"
read str1
echo "Enter second string"
read str2
if [ -z $str1 && -z $str2 ];
then
echo "firs and second string length is zero"
else
echo "firs and second string length is not zero"
fi