[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: feature request: printf %(%s)T
From: |
Chet Ramey |
Subject: |
Re: feature request: printf %(%s)T |
Date: |
Wed, 23 Nov 2011 12:00:34 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0 |
On 11/22/11 4:53 PM, Greg Wooledge wrote:
> This is a feature request, rather than a bug. Bash 4.2's printf command
> has a lovely %(datefmt)T feature that allows it to print out formatted
> timestamps using the underlying operating system's strftime(3) routine.
> It even allows bash to print the current time, or the time the current
> shell was invoked.
I wonder if a better way to handle this is to require the %s expansion
at configure time and use the strftime replacement in lib/sh if the C
library's strftime doesn't implement it. What systems, if you know, do
not handle %s?
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/