Hi,
Windows:
type | find ":"
*NIX
grep ":"
or
grep -v "^$"
I can't find the windows equivalent of the last command, if there is one.
Regards,
Patrick
On 20 February 2012 at 10:38 Anurag Sharma
wrote:
>
>
> Thank you Leo,
>
> Could please tell me how can get a : seprated output if I already have a
list of media to be expired in another text file in a tabular format ?
>
> What I'm asking is this - I want a command which converts
>
>
>
>
> :MO0174
>
>
> :MO0928
>
>
> :MO0486
>
>
> :MO0074
>
>
> :MO0718
>
>
> :MO0355
>
>
> :MO0789
>
>
> to this
> :MO0174
> :MO0928
> :MO0486
> :MO0074
> :MO0718
> :MO0355
> :MO0789
>
>
>
>
> Date: Tue, 14 Feb 2012 17:30:07 +0800
> Subject: Re: [Veritas-bu] vmchange script
> From: dream...@gmail.com
> To: veritas-bu@mailman.eng.auburn.edu
> CC: sharma.anu...@hotmail.com
>
> Hi
>
> Last time i use this to generate a file with colon separated media
labels:
>
> @bpimagelist -A -media -idonly -hoursago 24 | find "MO" | tr \r\n ":" |
sed -e s/::/:/g -e s/:$//g > %MEDIA_FILE%
>
>
> Hope it help.
>
> Leo
>
> On Sun, Feb 12, 2012 at 10:35 PM, Justin Piszcz
wrote:
>
> Hi,
> That would be just the media label— one command per TAPE.
> vmchange .. etc etc .. –ml TAPE01
> vmchange .. etc etc .. –ml TAPE02vmchange .. etc etc .. –ml TAPE03
> Justin.
>
> From: Anurag Sharma [mailto:sharma.anu...@hotmail.com]
>
> Sent: Sunday, February 12, 2012 8:59 AM
> To: jpis...@lucidpixels.com; veritas-bu
> Subject: RE: [Veritas-bu] vmchange script
>
>
> Justin,
>
> $Tape
>
>
> What would that file contain
>
> just the media labels
>
> or
>
> media labels which are colon seperated. if yes kind send how this script
would look in windows nbu
>
>
>
> From: jpis...@lucidpixels.com
> To: sharma.anu...@hotmail.com; veritas-bu@mailman.eng.auburn.edu
>
> Subject: RE: [Veritas-bu] vmchange script
> Date: Sun, 12 Feb 2012 08:27:39 -0500Hi,
>
> There is a better way.
> There is an undocumented option called –single_cycle.
> This will put the tapes in the cap one by one and not prompt you to
remove them.
> The best of both worlds J
>
> Example Syntax:
> /usr/openv/volmgr/bin/vmchange -h "$MASTER_SERVER" -rh "$ROBOT_CTRL_HOST"
-rn "$ROBOT_NUM" -rt "$ROBOT_TYPE" -multi_eject -map any -res -ml "$TAPE"
-verbose -single_cycle
>
> Justin.
>
> From: veritas-bu-boun...@mailman.eng.auburn.edu
[mailto:veritas-bu-boun...@mailman.eng.auburn.edu] On Behalf Of Anurag
Sharma
>
> Sent: Sunday, February 12, 2012 7:40 AM
> To: veritas-bu
> Subject: [Veritas-bu] vmchange script
> Hi Team,
>
> Here's is my challenge.
>
> Every week I have to change tapes in two libraries one has a cap size of
25 and another has of 35.
>
>
> Now I get a list of tapes to be ejected and sent offsite via script the
real challenge is ejecting them.
>
> I can use the vmchange command in two separate consoles
>
> Syntax : vmchange -res -multi_eject -w -rn 0 -rt tld -rh
pnors950.mgroupnet.com -ml
>
>
> Example :vmchange -res -multi_eject -w -rn 0 -rt tld -rh server.xyz.com
-ml MO0371:MO0012:MO0454:MO0775:MO0017
>
>
> I want to create a script which automates this one of the sample script
is
>
>
> FOR /F %%i IN (E:\\setin.txt) DO E:\VERITAS\Volmgr\bin\vmchange -res
-multi_eject -w -rn 3 -rt tld -rh pnors954.mgroupnet.com -ml
%%i>>E:\\ejectoutput.txt
>
>
> The above script uses a file setin.txt which would have list of labels
with colon separated
>
> MO0371:MO0012:MO0454:MO0775:MO0017
>
> The only challenge is this I want the script to take input of labels as
file and do not want manually colon separate them manually.
>
>
>
> Please provide suggestions.
>
> Anurag
>
>
>
>
>
>
> ___
>
> 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