delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/08/12/01:00:30

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <1454.81.17.205.14.1218517172.squirrel@webmail2.nebula.fi>
Date: Tue, 12 Aug 2008 07:59:32 +0300 (EEST)
Subject: changed behaviour in date command
From: "Nicholas Volk" <nvolk AT bitlips DOT fi>
To: cygwin AT cygwin DOT com
User-Agent: SquirrelMail/1.4.10a
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Hi all,

I have used script to pach a group of files. The relevant command in the
script has been

tar -jcvf api-`date '+%Y%m%d%k%M'`.tbz files

After I updated cygwin today (bash updated) this no longer works as such,
because the behaviour of %k has changed: instead of the usual "07" I now
get " 7". Is this intentional? At least in my opinion the new behaviour is
worse than the original.

(The fix itself is easy: tar -jcvf api-`date '+%Y%m%d%k%M' | tr ' '
'0'`.tbz files )

br,
  Nicholas




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019