grep 能同時過濾 2個條件嗎 - Linux

Table of Contents

我想要用grep 指令,同時過濾「兩個條件」

比如說,我想抓出一行中,同時有提到 sta1 與 sta2 字眼,

但找了很久, 似乎文件都只提到單一條件

請問我的要求,grep可以滿足嗎...

--

All Comments

Dorothy avatarDorothy2008-05-22
egrep
Elma avatarElma2008-05-26
現在所有的 grep 不都是 egrep 了嗎
Irma avatarIrma2008-05-28
grep -E = egrep