Date: Thu, 17 Sep 2009 00:32:26 +0100 From: RW <rwmaillists@googlemail.com> To: freebsd-questions@freebsd.org Subject: Re: A question about the date Function Message-ID: <20090917003226.5a3f2ed1@gumby.homeunix.com> In-Reply-To: <200909162025.n8GKP4M6095537@dc.cis.okstate.edu> References: <200909162025.n8GKP4M6095537@dc.cis.okstate.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 16 Sep 2009 15:25:04 -0500 Martin McCormick <martin@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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090917003226.5a3f2ed1>