Re: [Networker] How to query for client's comment field
2006-11-03 11:20:40
> I am working on a script and need to be able to query Networker from the
> command line for a list of clients with their respective comment fields
> and dump it to a file, one client/comment per line. Looks like nsradmin
> is the only tool to extract that sort of information, but I can't seem
> to get it to output what I need. Any one know how to do this?
Use show for the attributes you want to see, print to select the
resources.
nsradmin> show name; comment
nsradmin> print type:nsr client
Scripted...
printf "show name;comment\nprint type:nsr client\n" | nsradmin -i -
However, I don't know that you can ask it for the exact layout you
want. Nsradmin output is one attribute per line, with a blank line
separating resources.
I would post-process the output with perl or awk or something.
--
Darren Dunham ddunham AT taos DOT com
Senior Technical Consultant TAOS http://www.taos.com/
Got some Dr Pepper? San Francisco, CA bay area
< This line left intentionally blank to confuse you. >
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
wit 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
|
|
|