From owner-freebsd-questions@FreeBSD.ORG Wed Sep 16 23:32:31 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFEC0106568B for ; Wed, 16 Sep 2009 23:32:31 +0000 (UTC) (envelope-from rwmaillists@googlemail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.158]) by mx1.freebsd.org (Postfix) with ESMTP id 60A8D8FC18 for ; Wed, 16 Sep 2009 23:32:31 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id e21so1174420fga.13 for ; Wed, 16 Sep 2009 16:32:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type:content-transfer-encoding; bh=3GNGe9f2s4/FmyNTWfMCMVX3jsBfZrccmA/fJZmGej0=; b=Lny6ru+vPNKZo+amVCngDGUzwbX87KSYWHZR7N1xXsD5faUIeVxAp6uRNWohNPGIcj u3KbbMTFX6e4F5mDl2X90NPDicApQGDJQQlihr1gMtTYUNMsDhkKvFgev/Uk1H0UF39w b3+MuRTMOsdsehPYEdPKbcGRGQmx/yMJXaaIA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=nGGD2eUViIHOSF2zKNP4unmosZ+FTHcf9D2V5CmbcZbQ5GSyES60bUeh/1ZArimA28 W4Ee84It7x6sCLlf6qrr9NsreBZa3QZxluKUHEFlbav56+PPadH/oz/Vo9JDchMoyPIp zwD0QK/hczoVoueIy8+lk7acDKhlNZqaQF9+o= Received: by 10.86.10.36 with SMTP id 36mr272447fgj.61.1253143950086; Wed, 16 Sep 2009 16:32:30 -0700 (PDT) Received: from gumby.homeunix.com (bb-87-81-140-128.ukonline.co.uk [87.81.140.128]) by mx.google.com with ESMTPS id e11sm534112fga.23.2009.09.16.16.32.28 (version=SSLv3 cipher=RC4-MD5); Wed, 16 Sep 2009 16:32:29 -0700 (PDT) Date: Thu, 17 Sep 2009 00:32:26 +0100 From: RW To: freebsd-questions@freebsd.org Message-ID: <20090917003226.5a3f2ed1@gumby.homeunix.com> In-Reply-To: <200909162025.n8GKP4M6095537@dc.cis.okstate.edu> References: <200909162025.n8GKP4M6095537@dc.cis.okstate.edu> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.6; i386-portbld-freebsd7.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: A question about the date Function X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Sep 2009 23:32:31 -0000 On Wed, 16 Sep 2009 15:25:04 -0500 Martin McCormick 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.