codition in bash code example
Example: codition in bash
# short if codition
[ $(( 2 + 2 )) -eq '4' ] && echo "yes"
# long if codition
if [ $(( 2 + 2 )) -eq '4' ]
then
echo "yess"
fi
# short if codition
[ $(( 2 + 2 )) -eq '4' ] && echo "yes"
# long if codition
if [ $(( 2 + 2 )) -eq '4' ]
then
echo "yess"
fi