Need help here. Sample report from oracle below.
Tablespace Report for Database IMDB on Host ZZZ01
================================================== =====
------------------------------------------------------
Tablespace Name

EFAULT_UNDO_TBS
Allocated Space for tablespace (MB) :198
Free Space for tablespace (MB) :197
Used (MB) :1
% Free space in tablespace :19
------------------------------------------------------
Tablespace Name :WAKINDEXES
Allocated Space for tablespace (MB) :1000
Free Space for tablespace (MB) :931
Used (MB) :69
% Free space in tablespace :23
------------------------------------------------------
I wanna grep for the line "% Free space in tablespace" and report if it's less than 20. Ok that's easy but i need the report to be like one below. Just need the Host, Database name and Tablespace name.
Tablespace Report for Database IMDB on Host ZZZ01
================================================== =====
Tablespace Name

EFAULT_UNDO_TBS
% Free space in tablespace :19