Use for /F "tokens=<whatever>" %a in ('vmquery -r <robot number>') do bpmedia -freeze -m %a
Some refinement will be necessary, but a single command line will do. Remove vmquery headers by: for /F "tokens=<whatever>" %a in ('vmquery -r <robot number>') do echo %a | find "<header text>" || bpmedia -freeze -m %a ________________________________ Brenton Carbins Senior Systems Engineer WA and SA Enterprise Products Symantec Corporation www.symantec.com ----------------------------------------------------- Office: 08 9480 3720 Mobile: 0409 779 230 Fax: 08 9481 3177 Email: [EMAIL PROTECTED] ----------------------------------------------------- Symantec Logo -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Markham Sent: Monday, 15 May 2006 5:54 PM To: [EMAIL PROTECTED] Cc: WEAVER, Simon; 'veritas-bu@mailman.eng.auburn.edu'; [EMAIL PROTECTED] Subject: Re: [Veritas-bu] URGENT AND HELP Quickest Way to Freeze Tapes Not sure how awk and a for x loop are gonna work on windows unless you are running cygwin or something similar. D [EMAIL PROTECTED] wrote: > > Those commands work on Windows. You need to login as administrator on > the media server that knows about the tape and go to the > D:\VERITAS\NetBackup\bin\admincmd directory . > You can run the same commands as unix from that directory on the > windows server. > Note this is for Netbackup 5.1 or earlier, on 6.0 it will be different. > > > > ============================= > Carl Stehman > IT Infrastructure Team > Pepco Holdings, Inc. > 202-331-6619 > Pager 301-765-2703 > [EMAIL PROTECTED] > > > *Dave Markham <[EMAIL PROTECTED]>* Sent by: > [EMAIL PROTECTED] > > 05/12/2006 10:24 AM > Please respond to > [EMAIL PROTECTED] > > > > To > "WEAVER, Simon" <[EMAIL PROTECTED]> cc > "'veritas-bu@mailman.eng.auburn.edu'" > <veritas-bu@mailman.eng.auburn.edu> > Subject > Re: [Veritas-bu] URGENT AND HELP Quickest Way to Freeze Tapes > > > > > > > > > > arr ok. > > Also i just realized you are windows aint ya :) so my unix stuff wouldnt > work anyway > > D > > WEAVER, Simon wrote: > > Dave > > Thanks - in fact I done it a while ago now - using the manual > method, but it > > did not take as long as I expected :-) > > > > Thanks anyhow > > > > Regards > > > > Simon Weaver > > 3rd Line Technical Support > > Windows Domain Administrator > > > > EADS Astrium Limited, B32AA IM (DCS) > > Anchorage Road, Portsmouth, PO3 5PU > > > > Email: [EMAIL PROTECTED] > > > > > > > > -----Original Message----- > > From: Dave Markham [mailto:[EMAIL PROTECTED] > > Sent: 12 May 2006 14:25 > > To: WEAVER, Simon > > Cc: 'veritas-bu@mailman.eng.auburn.edu' > > Subject: Re: [Veritas-bu] URGENT AND HELP Quickest Way to Freeze Tapes > > > > > > If its all tapes in your robot id do something on command line for a > loop. > > > > Off top of my head id do :- > > > > echo "s s" | /usr/openv/volmgr/bin/tldtest -r <path to robot. e.g > > /dev/sg/c3t0l0> |awk '/Barcode/ {print $NF} |xargs bpmedia -freeze -m > > > > If that dont work take off the | xargs bpmedia -freeze -m and do :- > > > > echo "s s" | /usr/openv/volmgr/bin/tldtest -r <path to robot. e.g > > /dev/sg/c3t0l0> |awk '/Barcode/ {print $NF} >/tmp/list > > > > for x in `cat /tmp/list` > > do > > bpmedia -freeze -m $x > > done > > > > > > Then you will have to press y a few times :) > > > > Hope this helps and theres probably an easier way > > > > > > > > WEAVER, Simon wrote: > > > >> */Guys/* > >> */Have 137 Tapes in my Robot I need to freeze VERY quickly in > >> preperation for new media./* > >> *//* > >> */apart from bpmedia -freeze is there anything in the gui that will > >> allow me to freeze all tapes or all tapes in a volume?/* > >> *//* > >> */thanks/* > >> > >> > >> /Regards/ > >> > >> /Simon Weaver > >> *3rd Line Technical Support > >> Windows Domain Administrator*/ > >> > >> /EADS Astrium Limited, B32AA IM (DCS)/ > >> /Anchorage Road, Portsmouth, PO3 5PU/ > >> > >> /Email: //[EMAIL PROTECTED]/ > >> <mailto:[EMAIL PROTECTED]> > >> > >> > >> This email is for the intended addressee only. > >> If you have received it in error then you must not use, retain, > >> disseminate or otherwise deal with it. Please notify the sender by > >> return email. The views of the author may not necessarily constitute > >> the views of EADS Astrium Limited. > >> Nothing in this email shall bind EADS Astrium Limited in any contract > >> or obligation. > >> > >> EADS Astrium Limited, Registered in England and Wales No. 2449259 > >> Registered Office: Gunnels Wood Road, Stevenage, Hertfordshire, SG1 > >> 2AS, England > >> > >> > > > > This email is for the intended addressee only. > > If you have received it in error then you must not use, retain, > disseminate or otherwise deal with it. > > Please notify the sender by return email. > > The views of the author may not necessarily constitute the views of > EADS Astrium Limited. > > Nothing in this email shall bind EADS Astrium Limited in any > contract or obligation. > > > > EADS Astrium Limited, Registered in England and Wales No. 2449259 > > Registered Office: Gunnels Wood Road, Stevenage, Hertfordshire, SG1 > 2AS, England > > _______________________________________________ > > Veritas-bu maillist - Veritas-bu@mailman.eng.auburn.edu > > http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu > > > > > > > > _______________________________________________ > Veritas-bu maillist - Veritas-bu@mailman.eng.auburn.edu > http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu > > > > This Email message and any attachment may contain information that is > proprietary, legally privileged, confidential and/or subject to > copyright belonging to Pepco Holdings, Inc. or its affiliates ("PHI"). > This Email is intended solely for the use of the person(s) to which it > is addressed. If you are not an intended recipient, or the employee or > agent responsible for delivery of this Email to the intended > recipient(s), you are hereby notified that any dissemination, > distribution or copying of this Email is strictly prohibited. If you > have received this message in error, please immediately notify the > sender and permanently delete this Email and any copies. PHI policies > expressly prohibit employees from making defamatory or offensive > statements and infringing any copyright or any other legal right by > Email communication. PHI will not accept any liability in respect of > such communications. _______________________________________________ Veritas-bu maillist - Veritas-bu@mailman.eng.auburn.edu http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu _______________________________________________ Veritas-bu maillist - Veritas-bu@mailman.eng.auburn.edu http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu