I have two string variables that I need to compare by length inside of if
. So I need to do something like this:
if [ length($string_one) != length($string_two) ]:
fi
CodePudding user response:
if [[ ${#string} != ${#string_two} ]]; then
run command
fi