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

By Charlie
at 2008-05-22T21:59
at 2008-05-22T21:59
Table of Contents
※ 引述《cotix (Feb 14, 2007)》之銘言:
: 我想要用grep 指令,同時過濾「兩個條件」
: 比如說,我想抓出一行中,同時有提到 sta1 與 sta2 字眼,
: 但找了很久, 似乎文件都只提到單一條件
: 請問我的要求,grep可以滿足嗎...
用 egrep就好了
ps -aux | egrep '1234|5678'
要加上 ' '
---
in3
--
--
為 ◢██◣ 對不起 ◢██◣◢ 是我的喔~
都 什ˋ █◥◥◥ 我懷孕了 ◤◤◤◥ ◢██◣ˊ
要 麼 █◢● ● 但是孩子 ︶ ︶█◥ ◤◤◤◥◤
戴 我 ◥∥▋ ◤ 不是你的ˋ◥▄"█◤ +● <█◥
套 ◢██◣ ◢██◣ ◥▼ █◤
--
: 我想要用grep 指令,同時過濾「兩個條件」
: 比如說,我想抓出一行中,同時有提到 sta1 與 sta2 字眼,
: 但找了很久, 似乎文件都只提到單一條件
: 請問我的要求,grep可以滿足嗎...
用 egrep就好了
ps -aux | egrep '1234|5678'
要加上 ' '
---
in3
--
--
為 ◢██◣ 對不起 ◢██◣◢ 是我的喔~
都 什ˋ █◥◥◥ 我懷孕了 ◤◤◤◥ ◢██◣ˊ
要 麼 █◢● ● 但是孩子 ︶ ︶█◥ ◤◤◤◥◤
戴 我 ◥∥▋ ◤ 不是你的ˋ◥▄"█◤ +● <█◥
套 ◢██◣ ◢██◣ ◥▼ █◤
--
Tags:
Linux
All Comments
Related Posts
套件管理的command

By Jack
at 2008-05-22T20:54
at 2008-05-22T20:54
請問怎麼查function key的設定呢?

By Necoo
at 2008-05-22T16:26
at 2008-05-22T16:26
安裝程式的路徑問題

By Connor
at 2008-05-22T16:16
at 2008-05-22T16:16
grep 能同時過濾 2個條件嗎

By Genevieve
at 2008-05-22T14:14
at 2008-05-22T14:14
ati vs nvidia in ubuntu 8.04

By Ingrid
at 2008-05-22T09:04
at 2008-05-22T09:04