判斷文字檔是否出現 "i=0" 字串 - Linux
By Puput 
at 2011-08-16T23:26
at 2011-08-16T23:26
Table of Contents
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裡包含 "="
我這樣寫會有問題
請問怎麼做比較對呢?
謝謝
--
Tags:
        Linux
        
All Comments
By Ivy 
at 2011-08-17T18:26
at 2011-08-17T18:26
By Ula 
at 2011-08-20T20:06
at 2011-08-20T20:06
By Erin 
at 2011-08-24T15:09
at 2011-08-24T15:09
By Skylar Davis 
at 2011-08-28T05:04
at 2011-08-28T05:04
Related Posts
ubuntu還原光碟大量佈署問題
By Yedda 
at 2011-08-16T17:48
at 2011-08-16T17:48
Nao robot安裝環境
By Victoria 
at 2011-08-16T15:06
at 2011-08-16T15:06
可以推薦我 embedded Linux C語言的書嗎?
By Edward Lewis 
at 2011-08-16T14:49
at 2011-08-16T14:49
Sendmail無法收信 可以寄信
By Rosalind 
at 2011-08-16T13:06
at 2011-08-16T13:06
在pcmanx上用輸入法
By Kristin 
at 2011-08-16T10:39
at 2011-08-16T10:39