Networker

Re: [Networker] Send mminfo results into split column csv file

2013-07-22 17:43:43
Subject: Re: [Networker] Send mminfo results into split column csv file
From: Tim Mooney <Tim.Mooney AT NDSU DOT EDU>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Mon, 22 Jul 2013 16:36:52 -0500
In regard to: [Networker] Send mminfo results into split column csv file,...:

I'm not very strong on my awk commands and was wondering if someone
could help me figure this out in creating a script that can help me do
this?

I don't see "awk" in your command, so probably not relevant.

I'm running the following command:
mminfo -avot -t "two years ago" -q type="LTO Ultrium-4" -q "olabel<='06/06/13'" -r 
"volume(25),barcode, type, volaccess(25), volflags, volretent(25), olabel(25), labeled(25), mounts, location(25), 
recycled(15)" | sort -u | grep -e volume -e 6m > ~/test.csv

You don't say what version of NetWorker you're using, but assuming it's
anything from the past several years, I think you should consider adding

        -xc,

to your flags.  That causes mminfo to use an export (x) format that is
comma-separated (c,), which sounds like what you want.

I then run "uuencode test.csv test.csv | mail my@address"

You would probably be better off using a tool or script to actually attach
the CSV file to the email, rather than making the CSV the body of the
email.

The goal is to send the results to the end user who can use excel to
sort everything - how ever the issue i am having is that when it imports
everything into the csv file the columns don't parse into different
columns when you open into excel, everything is just under one column
with giant spaces...

The -xc, should help a lot with that.

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