I'm trying to compare tablespaces sizes between 2 databases. I already extracted the needed field to compare as above:
STAT-TBS-DB-SOURCE.lst: (column 1 : TBS Name, column 2 : real size)
TBS001 12
TBS002 50
TBS003 20
TBS004 45
STAT-TBS-DBTARGET.lst (column1:TBS Name, column 2 :max size)
TBS001 10
TBS002 50
TBS003 20
TBS004 40
I need to compare the second columns (c1,c2) of the 2 files (f1,f2), if f2.c2<f1.c2
then print increase Tablespace f1.c1 by ( f1.c2 - f2.c2) MB
.
What solution have you for me?
I tried with awk but I cannot get the value of the f1.c2.
Thanks