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: Clark WANG
Subject: Re: RFE: printf '%(fmt)T' prints current time by default
Date: Thu, 15 Nov 2012 13:53:21 +0800

On Wed, Nov 14, 2012 at 7:57 PM, Roman Rakus <address@hidden> wrote:

> 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
>

Thanks. As a bash user since 2.05b I did not read the man page of newer
versions carefully enough. :)

>
> RR
>
>


reply via email to

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