My shell script looks like below.
#!/bin/bash
STR1="STRING1"
STR2="STRING2"
if [[ "sample string contains some value" == *"contains"* ]]; then
  if [ "$STR1" != "$STR2" ]; then
    echo "do something"
  fi
fi
How do I can merge two if line into single if?
My script searches for a substring in a string and compares the other two strings to do something.