if condition shell script code example
Example 1: if else statement example in shell script
if [ ... ]
then
# if-code
else
# else-code
fi
Example 2: if and if bash
if [ "${STATUS}" != 200 ] && [ "${STRING}" != "${VALUE}" ]; then
if [ ... ]
then
# if-code
else
# else-code
fi
if [ "${STATUS}" != 200 ] && [ "${STRING}" != "${VALUE}" ]; then