Networker

[Networker] Scripting mminfo on Windows problem

2007-10-02 11:19:51
Subject: [Networker] Scripting mminfo on Windows problem
From: MIchael Leone <Michael.Leone AT PHA.PHILA DOT GOV>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Tue, 2 Oct 2007 11:14:22 -0400
Hope somebody can point me at a clue ... I'm trying to write a script in 
Win2003 for Network 7.3.2.jumbo that runs mminfo in a for loop, to return 
some volume IDs.

> Weird .... when I do 
> 
> for /f %%v in ('mminfo -q near,volrecycle,pool=PHAPRD -r volume') do
> @ECHO Found a PHAPRD that is RECYCLE! %%v

That's one line, wrapped ...

> in my CMD file, it errors out ....
> 
> C:\PHA Scripts>for /F %v in ('mminfo -q near volrecycle pool PHAPRD -r 
volume')
> do @ECHO Found a PHAPRD that is RECYCLE! %v
> mminfo: invalid volume name `-r'
> usage: mminfo [-avV] [-o order] [-s server] [-x exportspec] [report]
> [query] [vo
> lname...]
> 
> <report>: [ -m | -p | -B | -S | -X | -r reportspec ]
> <query>:  [-c client] [-N name] [-t time] [-q queryspec]
> 
> -----------------------
> 
> Yet, when I do the mminfo from a command line, all is fine; I get 
> back the 2 volume numbers I want ...
> 
> C:\PHA Scripts>mminfo -q near,volrecycle,pool=PHAPRD -r volume
> 896766
> 897478
 
The "for /f (%%variable) in (command) do (command-to-do)" is how you do a 
for loop in Windows shell scripting. And I know the mminfo command 
construct is correct, since it works at the command line.

I've tried asking on Windows lists, but since it's a Networker command 
that is failing in the for loop, I haven't had a whole lot of answers 
(since it's hard to replicate, if you are not using Networker). So I 
thought I'd ask here, where I'd have a better chance of interacting with 
someone who is using Networker in a Windows environment, who might be able 
to point me at the clue I'm missing here.

Thanks.


-- 
Michael Leone
Network Administrator, ISM
Philadelphia Housing Authority
2500 Jackson St
Philadelphia, PA 19145
Tel: 215-684-4180
<mailto:michael.leone AT pha.phila DOT gov>

To sign off this list, send email to listserv AT listserv.temple DOT edu and 
type "signoff networker" in the body of the email. Please write to 
networker-request AT listserv.temple DOT edu if you have any problems with this 
list. You can access the archives at 
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER

<Prev in Thread] Current Thread [Next in Thread>