본문으로 건너뛰기
0%

Bash String Comparison with if

카테고리

Bash string comparison using “if”

”==” and ”!=” only can be used in case of string comparison.

if [ "$STRING" == "abc" ];then
    echo "STRING is abc!"
fi 

or

if [ "$STRING" = "abc" ];then
    echo "STRING is abc!"
fi 

Appendix. References

댓글 남기기

여러분의 생각을 들려주세요

댓글

GitHub 계정으로 로그인하여 댓글을 남겨보세요. 건설적인 의견과 질문을 환영합니다!

댓글을 불러오는 중...