1. 程式人生 > >使用grep -E進行多條件過濾

使用grep -E進行多條件過濾

linux

由於svn文件authz比較大,我需要從裏面過濾出幾個想要的AppId項目名稱,即:

project_A6078086216274 = xx
project_A6078086227691 = xx
project_A6078086224420 = xx
project_A6078086233620 = xx
project_A6078086240348 = xx
project_A6078086358053 = xx
project_A6078086366505 = xx
project_A6078086364085 = xx

使用下面的命令進行操作

cat authz|grep -E 'project_A6078086216274|project_A6078086227691|project_A6078086224420|project_A6078086233620|project_A6078086240348|project_A6078086358053|project_A6078086366505|project_A6078086364085'


使用grep -E進行多條件過濾