awk problem two lines in the same line

Hi guy,

I have an output command like this:

  Policy Name:           NBU.POL.ORA.PROD
  Policy Type:         Oracle
  Active:              yes
  HW/OS/Client:  Linux         RedHat2.6     node1
  Iclude:  /usr/openv/netbackup/scripts/backup_ora1.bash

I would like to parse the command to obtain this result:

node1    /usr/openv/netbackup/scripts/backup_ora1.bash

Now i use this command:

bppllist NBU.POL.ORA.PROD -U | awk '$1 == "HW/OS/Client:" {print $4} ; $1 == "Include:" {print $2}' 

but the output is not my liking.

node1 
/usr/openv/netbackup/scripts/backup_ora1.bash

Someone help me to obtain the correct form.

thanks a lot.

Thank you for posting detailed input and output, sometimes it's a chore to find out what people really want but your requirements are quite obvious :slight_smile: We'd also appreciate them being in code tags, look for the button when you make a post.

awk '/Client:/ {A=$4}; /Include:/ {print A, $2}'