grep 使用或条件 ( grep -e )

时间:2023-03-09 08:02:35
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
test@k1rhel5822161:/home/test>