how to use if statements in shell script code example Example: if else statement example in shell script if [ ... ] then # if-code else # else-code fi