Networker

Re: [Networker] Getting leading zeros in date and time output from mminfo?

2010-09-16 12:47:39
Subject: Re: [Networker] Getting leading zeros in date and time output from mminfo?
From: Michael Leone <Michael.Leone AT PHA.PHILA DOT GOV>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Thu, 16 Sep 2010 12:46:39 -0400
> The 'date' field is available by default, but to get something useful,
> check out custom mminfo queries.
> 
> You can specify a different request using nsavetime. Like:

Yes, I know about nsavetime, but I don't want it, as it's not easily human 
readable. I want (and am specifying) savetime(22). 

> Or even more simply, let mminfo sort for you with the -ot option

I use the -ot. That's not the issue. It sorts fine; what it doesn't do is 
line up ...

>mminfo -s admnman004 -avot -q "client=old-admin-nt9" -r 
volume,ssid(10),client,name(6),savetime(22),ssbrowse(22),ssretent(22),totalsize(2),ssflags,sumflags

 volume        ssid      client     name       date     time browse time   
    retention time total ssflags fl
642NBroad.Full.057 2323215987 old-admin-nt9 D:\ 12/31/2007 6:08:35 PM 
9/14/2017 11:16:58 AM 10/14/2017 11:16:58 AM 66 GB vF hb
642NBroad.Full.058 2323215987 old-admin-nt9 D:\ 12/31/2007 6:08:35 PM 
9/14/2017 11:16:58 AM 10/14/2017 11:16:58 AM 66 GB vF tb
642NBroad.Full.073 3410003144 old-admin-nt9 D:\ 5/30/2008 6:50:41 PM 
6/9/2017 9:23:11 AM 6/9/2017 9:23:11 AM 105 GB vrF tr
642NBroad.Full.105 3410003144 old-admin-nt9 D:\ 5/30/2008 6:50:41 PM 
6/9/2017 9:23:11 AM 6/9/2017 9:23:11 AM 105 GB vrF hr

See how line 3 does not align under line 2? And that's because that time 
shows as "5/30/2008", instead of "05/30/2008", and because the time is 
"9:23" instead of "09:23". I want all times and dates to be the same 
number of digits, which means they sometimes need leading zeros, but I am 
not getting leading zeros.

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