[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Searching inside files in a script
From: |
Tapani Tarvainen |
Subject: |
Re: Searching inside files in a script |
Date: |
Tue, 12 Oct 2021 23:06:43 +0300 |
On Tue, Oct 12, 2021 at 02:57:01PM -0500, Dennis Williamson
(dennistwilliamson@gmail.com) wrote:
> > > tim=${EPOCHREALTIME//[![:digit:]]/.}
> > Note, I deliberately set LC_NUMERIC that way to get a comma as the
> > decimal point, I presume that's the reason you're trying to do that
> > //[![:digit:]]/. thing.
> Or to do integer math in Bash instead of float math in bc or something.
In that case the decimal point should be removed, not replaced
with a period. That is,
tim=${EPOCHREALTIME//[![:digit:]]/}
or, as there're never multiple decimal points,
tim=${EPOCHREALTIME/[![:digit:]]}
or is there a locale where there could be thousands separators or
something like that in $EPOCHREALTIME?
--
Tapani Tarvainen
- Searching inside files in a script, (continued)
- Re: Searching inside files in a script, Tapani Tarvainen, 2021/10/12
- Searching inside files in a script, Khan Smith, 2021/10/12
- Searching inside files in a script, Khan Smith, 2021/10/12
- Re: Searching inside files in a script, Alex fxmbsw7 Ratchev, 2021/10/12
- Searching inside files in a script, Khan Smith, 2021/10/12
- Re: Searching inside files in a script, Tapani Tarvainen, 2021/10/12
- Re: Searching inside files in a script, Dennis Williamson, 2021/10/12
- Re: Searching inside files in a script,
Tapani Tarvainen <=
- Re: Searching inside files in a script, Greg Wooledge, 2021/10/12
- Searching inside files in a script, Khan Smith, 2021/10/12