dear 各位
我想寫 bash shell 判斷文字檔是否包含 "i=0" 這個字串
我用 result=`grep "i=0" text.txt`
再判斷 if [$result==""]
因為$result裡包含 "="
我這樣寫會有問題
請問怎麼做比較對呢?
謝謝
--
我想寫 bash shell 判斷文字檔是否包含 "i=0" 這個字串
我用 result=`grep "i=0" text.txt`
再判斷 if [$result==""]
因為$result裡包含 "="
我這樣寫會有問題
請問怎麼做比較對呢?
謝謝
--
All Comments