<< Filter and Format the ouput >>

Hi All,

I have a output like below

$ cat aa.lst
  
  Value of output parameters
  ---------------------------------------
  Parameter Name  : SNAPSHOTTIMESTAMP
  Parameter Value : 2014-01-07-15.21.50.022423

  Parameter Name  : DATABASESIZE
  Parameter Value : 96178176

  Parameter Name  : DATABASECAPACITY
  Parameter Value : 206153830400

  Return Status = 0
DB20000I  The SQL command completed successfully.

I want to filter it out and format it as a below one. Pls help. Thanks !

DATABASESIZE --> 96178176 Bytes

Regards
Kamal

Something like this..?

michaelf>uname
SunOS
michaelf>nawk -F'[: ]' '/Parameter Name/{f=$5;getline;print f"-->"$5}' infile
SNAPSHOTTIMESTAMP-->2014-01-07-15.21.50.022423
DATABASESIZE-->96178176
DATABASECAPACITY-->206153830400
michaelf>
1 Like

Thanks a lot for your help