A question about the date Function

RW rwmaillists at googlemail.com
Wed Sep 16 23:32:31 UTC 2009


On Wed, 16 Sep 2009 15:25:04 -0500
Martin McCormick <martin at dc.cis.okstate.edu> wrote:

>
> date -j -f "%a %b %d %T %Z %Y" "`date`" "+%s" >f0
> date +%s >f1
> 
> I then compared the outputs of f0 and f1 and they are identical.
> 
> 	What does the long form of this command give us that
> date +%s fails to do?
> 
> 	Nothing is broken, here. I am just curious. Thank you.


I suspect that the the "long form" is just an example designed to
demonstrate more than one thing in single  line rather than a practical
suggestion.

I used to use it in scripts and never questioned it until for some
reason it stopped working, and I tried the simpler alternative. 


More information about the freebsd-questions mailing list