delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2024/04/01/11:29:06

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 09D4C3858D20
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1711985344;
bh=GtH04osiHVP6H2zWWiBrRbG8C3SXYj0StaOrtWgwmpE=;
h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post:
List-Help:List-Subscribe:From:Reply-To:From;
b=VGcmPbpqm4M/M+Kei217I5dIoxLuGXduCaCUUx7kuP/9VI1QgPGfrFQH3sFzxqx4r
D1a10CfnBMavFOVq/QQEnoorvPYM4+Fw047rYc059bl1Z4cLMTDZTBHHnLG/mWnhC2
8jiHt8wrfzhPpL0PLslcmE2Yba83jlffDLmHxXWw=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DABE73858D20
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DABE73858D20
ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1711985316; cv=pass;
b=YMrhEaHc4qqW2RPIqzyuSqe7+BWpgNuSHXM2++ENZ/TbGVcSYgXbwWSKAFyVKaoUngdKsSKW+PK96ELwrcn33oqtuUfhJDEs4REI9wnXz4QUBuLiCtgJWqyC8iLYvgw4xcqpv8/3MzbyYyKXSJugqsXZpldLF/mUAzkW7v7LYI8=
ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key;
t=1711985316; c=relaxed/simple;
bh=RQBmjnS2V1JW8bYwFQDOQ4p6X8pdKRPuvr21obxUrW4=;
h=DKIM-Signature:To:From:Subject:Message-ID:Date:MIME-Version;
b=TMOpb44oBocmXBuu9gDVuujWVxBIrln2/LvDZk8f1JenXjnJ/5KezCtWvza+5ydDE6Qb+Mf2SGz45i3CbXKER1QlbSrp78Gm3Ycq35LzQPFbSUZikUDZnUCcVD4WRco9n1hU9jONSc/Sl+rviwvPRW43xF4JPNWunf8qruC0yY4=
ARC-Authentication-Results: i=2; server2.sourceware.org
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
b=DodObkA6JawBB/NuWYvKvR331ileLZN6bTr3uPTApvF3+c+/T1M+gXRQDLICLq35jyZk6A8/bC8Co9EoHs+5jfo3rLmYIAREQFSFLcpwWBgUiMjgf+IOd279koYE4NvcGysc8+gWRuRzP8lR3btkaxrfI8bFMt9KguxjxVY5TWsznOtL9dMQUIHO9V9Pfag5ozeXK43AkdR/NTDw4+EDcK41XQkkq19qDTxaBHJp2xkq9uobJUrIZI7VWLJMz3OAhWL0GeU4kk90vHDEteTLqFewiTd4rbGGxkzWCy3q93n/fjXWXqcTe73r3owLd4vBFcueSdJ7f22ybsvOFz/zVg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector9901;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=+DlkoPgngz//NC8KzpOhl/eQvvtxCxiCPZmnHtsmzNI=;
b=Ej0ibdofXT9ImXftxeWr6d6EKX01jk4iOeCiLJKCp5sK8FE4QmbSPQWUcFPWKqwacN5D7igeW9qMpkz9JvRAn0dBRICtUyERhjB1V5rGMxR7CL518Mo9hjmu3iLz76KMJRTTh3pVSCUvSFUQWlckXfrYu5wZ5edwFCnnBg4A94fqZLd+pS8i456WHep3jAoU3gvrP0rrwdXmKxizu9zzn4R3kJSE9Z7mE3SrTGnrWuT7qUHFLpB4wHfrMOIbLGKcXsnCOnE40Hu+WBnEi9hxGGXCwSgY7r+6+IRx/m1O8SJ7lIZF9BYgmqel5i3CMdRyyyqMsJMtblJTtrRPf6YYMQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none;
dkim=none; arc=none
To: cygwin AT cygwin DOT com
Subject: bash builtin printf date format problem
Message-ID: <AS4P194MB18164A9A59EFC2E3C8439FF4CF3F2@AS4P194MB1816.EURP194.PROD.OUTLOOK.COM>
Date: Mon, 1 Apr 2024 16:28:28 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
Thunderbird/52.2.1 Lightning/5.4
X-TMN: [9gCw1CCt7PMIk0ho2Ms67ANvVIOyMtmq]
X-ClientProxiedBy: LO6P123CA0014.GBRP123.PROD.OUTLOOK.COM
(2603:10a6:600:338::17) To AS4P194MB1816.EURP194.PROD.OUTLOOK.COM
(2603:10a6:20b:514::8)
X-Microsoft-Original-Message-ID: <cbee1a02-2e42-d672-4c8c-0ba5ee45d6dc AT outlook DOT com>
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: AS4P194MB1816:EE_|DB9P194MB1484:EE_
X-MS-Office365-Filtering-Correlation-Id: d01b205f-fa28-45c8-9fff-08dc52606286
X-Microsoft-Antispam: BCL:0;
X-Microsoft-Antispam-Message-Info: Yb63o0PBXfWE+i4/bVbiPk+N3A2w+cI6tbXe1FeN0zU2dQw1XU25VyLR33eY9pUSfk9dp6UX+mq1wVgMBnWDttIxzdvG2rDejap1rjulEPocTbvaya0MX7x7lhkFjeQ3GelwNWIHQ3B3dSULFjI+vf8QaoOTCXxAbK1de65IjzUWmBwM7W1S8gHjrIi5+8EVB932HGzRFf6DPiGrs6JdbYwlLvfR+k6DfXVcRpkVe7ewDpIXAbnozovAiiwiigdHJzhJDWWsLTiJzuKA7K9YzhGGh8ZSkofr+bL9o0I31zj/GcbSydv95R4NQ6u/PY/jqli3FVbnAdgVgGaQbAycFqQ20jz4duiBzGmHUW63skDnlXMdfsfEB9V0QRJkGH5Duck7cSJJHVGrfEVVsfXk0TlNsv6RE+RshEwFHTPBeXdyroqdDY88m+8AM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utf-8?B?ZFJFbGNHc2dkTlNQajZscTZPWlFFbVIvUllTWFd3dEpYQzRQTEtKSC9aT01o?=
=?utf-8?B?cHp3NXdnemVLdHQ0UEpVQnI4U1FOVXRIR1FmMnMrNm91c2xvTzJsZ05xcnZ2?=
=?utf-8?Q?+vR1DkiT/KRtJ/rcEuyl7BwIKXpJ6l+R0F6y/F5mKj2c=3D?=
X-OriginatorOrg: outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: d01b205f-fa28-45c8-9fff-08dc52606286
X-MS-Exchange-CrossTenant-AuthSource: AS4P194MB1816.EURP194.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Apr 2024 15:28:30.5124 (UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa
X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9P194MB1484
X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_SHORT,
SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Chris Elvidge via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Chris Elvidge <celvidge AT outlook DOT com>
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

Using bash builtin printf '%(fmt)T', when fmt contains %-d (or %_d), 
there is no output - should print daynumber with no preceding 0 (or with 
preceding space). Similarly %-e. date +"%B %-d" works OK.

$ uname -a
CYGWIN_NT-10.0-19045 ASUS-X550C-WIN 3.5.1-1.x86_64 2024-02-27 11:54 UTC 
x86_64 Cygwin
$ bash --version
GNU bash, version 5.2.21(1)-release (x86_64-pc-cygwin)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
[0] ASUS-X550C-WIN!celvi:(pty0):Mon 01 Apr 2024 04:14 pm BST:/home/celvi
$ printf '%(%B %d)T\n'
April 01
[0] ASUS-X550C-WIN!celvi:(pty0):Mon 01 Apr 2024 04:15 pm BST:/home/celvi
$ printf '%(%B %-d)T\n'

[0] ASUS-X550C-WIN!celvi:(pty0):Mon 01 Apr 2024 04:15 pm BST:/home/celvi
$ printf '%(%B %_d)T\n'

[0] ASUS-X550C-WIN!celvi:(pty0):Mon 01 Apr 2024 04:19 pm BST:/home/celvi
$ printf '%(%B %e)T\n'
April  1
[0] ASUS-X550C-WIN!celvi:(pty0):Mon 01 Apr 2024 04:19 pm BST:/home/celvi
$ printf '%(%B %-e)T\n'

[0] ASUS-X550C-WIN!celvi:(pty0):Mon 01 Apr 2024 04:19 pm BST:/home/celvi

Works properly on Slackware current and LMDE6. Anyone any ideas?


Thanks




-- 

Chris Elvidge

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

- Raw text -


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