linux script sh 字串 檢查
2021/11/03 11:43
瀏覽95
迴響0
推薦0
引用0
this line can not set #!/bin/sh XD
===
#!/bin/sh
st1=`sudo fastboot devices`
if [ -z "$st1" ]; then
echo "no device"
exit 1
fi
===
#!/bin/sh
aaa="111"
bbb="111"
if [ "$aaa" = "$bbb" ] # space is must
then
echo ok
else
echo ng
fi
===
#!/bin/sh
aaa="111"
bbb="111"
if [ -f "/etc/rc.local" ] # space is must
then
echo ok
else
echo ng
fi
你可能會有興趣的文章:
限會員,要發表迴響,請先登入

