Networker

Re: [Networker] mminfo query question

2009-01-13 09:20:29
Subject: Re: [Networker] mminfo query question
From: Len Philpot <Len.Philpot AT CLECO DOT COM>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Tue, 13 Jan 2009 08:17:33 -0600
Yep - That's what I'm doing (egrep), but given the list of tapes to 
exclude will be entered by the user at runtime, I have to be careful with 
it. I guess I could let them space-delimit the tape list and shift them 
in, but that topic is outside the scope of this list.  :-)  Mostly I need 
to deal with mulit-part savesets that have pieces on more than one tape, 
and how mminfo reports on that, etc.

Thanks.
--
   Len Philpot 

   Cleco IT Network Services, PGO3 - ext 7167
(318) 484-7167    




From:
Tim Mooney <Tim.Mooney AT NDSU DOT EDU>
To:
NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date:
01/12/2009 05:01 PM
Subject:
Re: [Networker] mminfo query question



In regard to: [Networker] mminfo query question, Len Philpot said (at...:

> I know I can do things like
>        # mminfo -ar 'ssid,volume,client,name' -q 'volume=001234'
>
> But is there a way to specify all <whatever> except a certain one or a
> list of ones? eg. --
>        # mminfo -ar 'ssid,volume,client,name' -q
> 'volume!=001234,volume!=001235,ssid!=1234567890'

When I've needed to do stuff like this in the past, I've found it easiest
to just postprocess the output with "grep -v".  The trick is that you have
to be careful that grep only matches the fields you're interested in.
In other words, if "001234" occurs as part of a substring of the ssid,
you don't want that getting thrown out.  It can help to arrange your
query so that the fields you need to examine are at the beginning or end
of each output line.

It can also be helpful to specify the field separator in the output from
mminfo, as that can sometimes make it easier to construct the regex for
grep.

With that in mind, something like

                 mminfo -xc@ -ar 'ssid,client,name,volume' |
                 egrep -v '(^1234567890@|@00123[45]$)'

should accomplish roughly what you're after.

Tim
-- 
Tim Mooney                                             Tim.Mooney AT ndsu DOT 
edu
Enterprise Computing & Infrastructure                  701-231-1076 
(Voice)
Room 242-J6, IACC Building                             701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

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



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>