【shell比较字符串】

if [ 'AAA' = 'ABC' ];
then 
    echo "the same" 
else 
    echo "not the same"
fi

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

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

猜你喜欢

转载自www.cnblogs.com/zealousness/p/11122795.html