<<Back to Linux Main Page
How to grep multiple values from the output of a command on Linux
I wanted to grep the list of patches I applied today. I have 3 patch numbers and I wanted to check if they are now present.
To grep multiple values from the output of a command you can use below command
$ opatch lsinventory -oh /ora_grid/product/11.2.0.4/grid |grep -e '29141201' -e '29497421' -e '29509309'
Patch 29509309 : applied on Fri Aug 23 10:12:00 CEST 2019
Patch description: "ACFS Patch Set Update : 11.2.0.4.190716 (29509309)"
Patch 29497421 : applied on Fri Aug 23 10:10:59 CEST 2019
Patch description: "Database Patch Set Update : 11.2.0.4.190716 (29497421)"
Patch 29141201 : applied on Fri Aug 23 10:10:33 CEST 2019
Patch description: "OCW Patch Set Update : 11.2.0.4.190416 (29141201)"
Comments
Post a Comment