grep 使用或条件 grep -e

test@k1rhel5822161:/home/test>cat 3
1 5
2 3
3 2
4
5
6
7
test@k1rhel5822161:/home/test>grep -e '2|3' 3
test@k1rhel5822161:/home/test>grep -E '2|3' 3
2 3
3 2
test@k1rhel5822161:/home/test>grep -E '2' -E '3' 3
3:2 3
3:3 2
3:2 3
3:3 2
test@k1rhel5822161:/home/test>grep -e '2' -e '3' 3
2 3
3 2
 

猜你喜欢

转载自blog.csdn.net/hjrnet/article/details/84287601