bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFE: printf '%(fmt)T' prints current time by default


From: Roman Rakus
Subject: Re: RFE: printf '%(fmt)T' prints current time by default
Date: Wed, 14 Nov 2012 12:57:01 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0

On 11/14/2012 04:00 AM, Clark WANG wrote:
In ksh:

$ printf '%(%F %T)T\n'
2012-11-14 10:57:26
$

In bash:

$ printf '%(%F %T)T\n'
1970-01-01 08:00:00
$

I think the ksh behavior is makes more sense so can we use the current time
as the default?

-Clark
For it there is -1 special parameter for printf:

$ printf '%(%F %T)T\n' -1
2012-11-14 12:54:56

RR



reply via email to

[Prev in Thread] Current Thread [Next in Thread]