Forum Discussion

rk1074's avatar
rk1074
Level 6
10 years ago

checking number of policies using any SLP

Hello ,

 

I need to find the name of all the polices using any particular SLP via command line. can anyone share the command for it

 

 

  • Try this (no guarantees & don't ask me to explain it!) using Mariannes SLP as an example:

     

    bppllist -allpolicies -U | egrep "Policy Name|AIR_DISC_2_APP" | awk '/Residence.*AIR_DISC_2_APP/{print x};{x=$3}'
    
    

     

    (& that is for a similar requirement from a previous post by a much more seasoned script writer - cheers Martin, I kept it and deciphered it for posterity & possible future use - now I just hope it works!)

  • its contans all  the SLP names using  specific DD box as storage

  • It's because the awk reads the $i variable literally in its search string /Residence.*$i/ - there is a way to read that variable in from the shell, but I'm no awk expert by any stretch of the imagination so am drawing a blank at the moment - will re-visit if I get chance......

  • Try:

    "bppllist -allpolicies -U | egrep ""Policy Name|$i"" | awk '/Residence.*"$i"/{print x};{x=$3}'"

    I got this to work in a script.