大神們,
makefile中寫了這么一段:
irun:
@echo "------------abstract start-------------------"
@-cat ./${MODULE}_irun.log | grep -n -E '\*E|\*W'
@echo -n "total error number: "
@-cat ./${MODULE}_irun.log | grep -s -c -E '\*E'
@echo -n "total warning number: "
@-cat ./${MODULE}_irun.log | grep -c -E '\*W'
@echo "------------abstract end---------------------"
terminal顯示:
〉〉〉make irun
------------abstract start-------------------
make: [irun] Error 1 (ignored)
total error number: 0
make: [irun] Error 1 (ignored)
total warning number: 0
make: [irun] Error 1 (ignored)
------------abstract end---------------------
grep的用法有錯誤嘛?匹配字符的個數確實為0個,怎么消除報錯呢?
讓其正常顯示為0個。
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/206034.html
標籤:專題技術討論區
上一篇:cobbler匯入報錯
