cancel
Showing results for 
Search instead for 
Did you mean: 

Need to print an o/p

Gopi4sl
Level 4

Hi Team,

 

I need to create a script to find the policy name for n numbers of clients.

I have used  bppllist -byclient <clientname>

but  it is taking lot of time to produce the o/p
 
and i have used bpcoverage and i felt it is fast compare to bppllist
 
bpcoverage -c <clientname>  -no_client_query -hardware -no_hw_header -no_cov_header
 
 
CLIENT: client name
 
   Policy Name                       Hardware/OS
   -----------                              -----------
   <policy name>                   PC-x64/Windows2003
 
 
Here i need to print only the policy name. Please me how to do it.
 
Thanks,
Gopinath
 

 

1 ACCEPTED SOLUTION

Accepted Solutions

mph999
Level 6
Employee Accredited

If you are using unix/ linux this should work

 

bpcoverage -c <clientname>  -no_client_query -hardware -no_hw_header -no_cov_header |awk '{print $1}' |sed 's/^CLIENT//g' |sed 's/^://' |sed 's/^Policy//' |sed 's/-//g'

Martin

View solution in original post

4 REPLIES 4

Gopi4sl
Level 4

Hi Ashish,

 

Thanks for your help. But it didnt help me for my question.

mph999
Level 6
Employee Accredited

If you are using unix/ linux this should work

 

bpcoverage -c <clientname>  -no_client_query -hardware -no_hw_header -no_cov_header |awk '{print $1}' |sed 's/^CLIENT//g' |sed 's/^://' |sed 's/^Policy//' |sed 's/-//g'

Martin

Gopi4sl
Level 4

Hi Martin,

Thanks for your help. It is working fine. But still i feel it is time consuming while searching n number of clients via script.

Is there any other quick way  to get the policy name alone for n number of clients.

Thanks in Advance!!

Regards,

Gopinath