linux下判斷文件中是否包含字符串

grep -wq "hello world" a.txt && echo "contain"||echo "not contain"spa 說明:grep -w 全匹配某一列co -q 不打印信息
相關文章
相關標籤/搜索