代码改变世界

【shell比较字符串】

2019-07-02 19:47  ZealouSnesS  阅读(354)  评论(0编辑  收藏  举报
if [ 'AAA' = 'ABC' ];
then 
    echo "the same" 
else 
    echo "not the same"
fi

shell比较字符串只能用=,不能用eq!

注意,加黄底色部分空格必不可少!