I need help to further reduce the output shown below. I want to be able to only return the paragraph where the 'Database alias' is exactly equal to DBIHP. I do not want the other paragraphs being shown below.
[diimps1@aixudbtest1 /home/dbadvlp]$ echo $dbalias
DBIHP
[diimps1@aixudbtest1 /home/dbadvlp]$ db2 list db directory|grep -p 'Database alias = '$dbalias
Database alias = DBIHPP1
Database name = DBIHPP1
Local database directory = /db2udb/diimps1/dbihpp1/dbpath
Database release level = a.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
Database alias = DBIHPS1
Database name = DBIHPS1
Local database directory = /db2udb/diimps1/dbihps1/dbpath
Database release level = a.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
Database alias = DBIHP
Database name = DBIHP
Local database directory = /db2udb/diimps1/dbihp/dbpath
Database release level = a.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =
Database alias = DBIHPC1
Database name = DBIHPC1
Local database directory = /db2udb/diimps1/dbihpc1/dbpath
Database release level = a.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname =
Alternate server port number =