In need of a bit of shellish magic
Greg Rundlett
greg.rundlett at gmail.com
Sat Jun 3 09:59:00 EDT 2006
On 6/2/06, James R. Van Zandt <jrvz at comcast.net> wrote:
>
>
> "Michael ODonnell" <michael.odonnell at comcast.net> wrote:
> > > The "-I" switch is short for ISO-8601, which apparently specifies
> > >dates as "all numeric, most significant component first". Which is
> > >handy, because then the files sort properly in directory listings.
> >
> > Yup, I have a lot of scripty stuff that depends on exactly such
> > sortability - very handy. I'd not heard of that -I switch before
> > and it seemed promising, but it turns out that the dashes in the
> > resultant strings render them useless for most of my purposes.
> > And I wonder why that switch isn't mentioned (at least on my
> > Debian unstable machines) in the man pages or in the output to
> > the --help switch? It's apparently a secret... ;->
>
> I submitted the patches to get the -I switch into date in the first
> place - including man page and help text updates. But now they're
> gone - not even in the info pages. The -I switch is still in the
> source code, but marked "deprecated".
>
> This is (was) Debian Bug#354799, discussed here:
>
> http://groups.google.com/group/linux.debian.bugs.dist/browse_thread/thread/248e13e6ee940d3d/16f1d0c8dd1e0e4f?lnk=st&q=date+gnu+%22iso+8601%22+%22-i%22+deprecated&rnum=1#16f1d0c8dd1e0e4f
>
> Apparently there was some difficulty parsing ISO 8601 dates, so they
> decided to switch to RFC 3339 instead. Even though all the problems
> seems to relate to the time part rather than the date.
>
> I guess we are expected to use "date --rfc-3339=date"
> now. Or, I suppose, "date +%F". Disappointing.
>
> - Jim Van Zandt
>
> _______________________________________________
> gnhlug-discuss mailing list
> gnhlug-discuss at mail.gnhlug.org
> http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
>
I hadn't heard of or used the -I option before and found it to be more
memorable than the traditional format identifiers (-I (for ISO) is easier to
remember than even +%F -- at least for me); Now in the same instant that I
learn about it, I learn that it's deprecated :-(
fwiw, It *is* documented on my system (Kubuntu) whether I use date --help
or man date. Even though I keep my system updated constantly, I have the
5.2.1 version of coreutils
date (coreutils) 5.2.1 September 2005
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.gnhlug.org/mailman/private/gnhlug-discuss/attachments/20060603/2b7a444d/attachment.html
More information about the gnhlug-discuss
mailing list