help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: was there a more fine number than $SECONDS for the same purpose


From: Tapani Tarvainen
Subject: Re: was there a more fine number than $SECONDS for the same purpose
Date: Sun, 7 Nov 2021 17:50:58 +0200

On Sun, Nov 07, 2021 at 03:57:30PM +0200, Tapani Tarvainen 
(bash@tapanitarvainen.fi) wrote:

> RADIX=${EPOCHREALTIME//[[:digit:]]/}

> Incidentally, is there any easier way to determine the decimal
> point in current locale?

Answering myself,

RADIX=$(locale decimal_point)

is a rather obvious alternative.

It does fork an external command and so it's probably slower than
extracting it from EPOCHREALTIME, but it might be preferable
nonetheless as a more readable alternative.

-- 
Tapani Tarvainen



reply via email to

[Prev in Thread] Current Thread [Next in Thread]