Networker

Re: [Networker] mminfo query question

2009-01-12 18:03:39
Subject: Re: [Networker] mminfo query question
From: Tim Mooney <Tim.Mooney AT NDSU DOT EDU>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Mon, 12 Jan 2009 16:57:24 -0600
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

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