Jonathan
I really appreciate the script
and will give it a try shortly, thanks.
OneWest Bank, FSB
Daniel Jimenez
Technical Consultant
16608 Valley View Ave
La Mirada, CA 90638
Phone: 714-520-3421
Cell: 562-480-2966
Fax: 714-520-3470
Daniel.Jimenez AT owb DOT com
Website: http://www.owb.com/
Website: http://www.onewestbank.com/
____________________________________________________________________
This message contains information which may be confidential and privileged.
Unless you are the addressee (or authorized to receive for the addressee),
you may not use, copy or disclose to anyone the message or any information
contained in the message. If you have received the message in
error, please
let the sender know and delete the message. Thank you.
From: Martin, Jonathan
[mailto:JMARTI05 AT intersil DOT com]
Sent: Monday, September 28, 2009 8:07 AM
To: Jimenez, Daniel; veritas-bu AT mailman.eng.auburn DOT edu
Subject: RE: [Veritas-bu] Bpplist Policy Script
My understanding of awk syntax has never been very good but here's
a windows script that will give you similar output (I think). Save as a
.vbs and run from the command line. You might need to change the location
of your bppllist.exe command.
set objWshShell = CreateObject("WScript.Shell")
set objExec = objWshShell.Exec("D:\Program
Files\VERITAS\NetBackup\bin\admincmd\bppllist.exe -allpolicies")
do while not objExec.StdOut.AtEndOfStream
output = Split(objExec.StdOut.ReadLine(), " ")
If output(0) = "CLASS" Then Wscript.Echo vbNewLine &
"Policy: " & output(1) End If
If output(0) = "RES" Then Wscript.Echo "Policy Storage Unit:
" & output(1) End If
If output(0) = "SCHED" Then Wscript.Echo "Schedule: " &
output(1) End If
If output(0) = "SCHEDRES" Then Wscript.Echo "Storage Unit:
" & output(1) End If
loop
-Jonathan
From: veritas-bu-bounces AT mailman.eng.auburn DOT edu
[mailto:veritas-bu-bounces AT mailman.eng.auburn DOT edu] On Behalf Of Jimenez,
Daniel
Sent: Friday, September 25, 2009 8:03 PM
To: veritas-bu AT mailman.eng.auburn DOT edu
Subject: [Veritas-bu] Bpplist Policy Script
I found the script below that pulls the policy and storage
device from Netbackup but it is for Unix and was wondering if anyone knows how
to translate this to Windows?
bppllist -allpolicies | awk `{
if ($1=="CLASS")
{c=$2;stu="";printf("\n%24s: ",c)}
if ($1=="RES" || $1=="SCHEDRES" ){
F=2
while($F!~/NULL/ && F<=NF)
{if($F!=stu){stu=$F;printf("%12s
",$F)};F++}
}
}END{printf("\n")}`
OneWest
Bank, FSB
Daniel Jimenez
Technical Consultant
16608 Valley View Ave
La Mirada, CA 90638
Phone: 714-520-3421
Cell: 562-480-2966
Fax: 714-520-3470
Daniel.Jimenez AT owb DOT com
Website: http://www.owb.com/
Website: http://www.onewestbank.com/
____________________________________________________________________
This message contains information which may be confidential and privileged.
Unless you are the addressee (or authorized to receive for the addressee),
you may not use, copy or disclose to anyone the message or any information
contained in the message. If you have received the message in
error, please
let the sender know and delete the message. Thank you.