|
From: | Chris Elvidge |
Subject: | Re: Problem printing 24 hour times |
Date: | Sat, 8 Jan 2022 15:56:15 +0000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 Lightning/5.4 |
On 08/01/2022 15:29, Greg Wooledge wrote:
On Sat, Jan 08, 2022 at 03:15:51PM +0000, Chris Elvidge wrote:I have got round the problem with tim24=$(date -d"$tim12" +"%-H%M") i.e. stripping leading zeros, but is there any way to force printf to recognise 0700 as a decimal number?Either strip the leading zeroes, or force base 10 with "$((10#$yourvariable))".
Thanks for the 'force base 10' idea -- Chris Elvidge England
[Prev in Thread] | Current Thread | [Next in Thread] |