develog

[Linux] shell script, if 본문

OS & Shell/Linux

[Linux] shell script, if

냐옴 2015. 1. 10. 15:21

#/bin/bash


a=10

b=20


if [ $a -eq 10 ] && [ $b -eq 20 ]; then

        echo ok

else

        echo not ok

fi


a=11

b=20


if [ $a -eq 10 ] || [ $b -eq 20 ]; then

        echo ok

else

        echo not ok

fi







Comments