I am using EPOCHREALTIME and then computing the corresponding human readable
form, that can handle
changes in locale
now=$EPOCHREALTIME
printf -v second '%(%S)T.%s' "${now%[^[:digit:]]*}" "${now#*[^[:digit:]]}"
printf -v minute '%(%M)T' "${now%[^[:digit:]]*}"
printf -v hour '%(%H)T' "${now%[^[:di
On Fri, 20 Aug 2021 19:28:25 +
hancooper via Bug reports for the GNU Bourne Again SHell
wrote:
> I am using EPOCHREALTIME and then computing the corresponding human readable
> form, that can handle
> changes in locale
>
> now=$EPOCHREALTIME
> printf -v second '%(%S)T.%s' "${now%[^[:digit:]
On 8/19/21 6:37 AM, Léa Gris wrote:
#!/usr/bin/env bash
declare -A assoc=(
[P]=piano
[TB]='foldable table'
['CH AIR']=chair
)
options=("${assoc[@]@K}")
The best way to clone an associative array is:
declare -A options
eval options=\( "${assoc[@]@K}" \)
The quoting @K performs is eval
Le 21/08/2021 à 00:06, Chet Ramey écrivait :
On 8/19/21 6:37 AM, Léa Gris wrote:
#!/usr/bin/env bash
declare -A assoc=(
[P]=piano
[TB]='foldable table'
['CH AIR']=chair
)
options=("${assoc[@]@K}")
The best way to clone an associative array is:
declare -A options
eval options=\( "${as
On Fri, Aug 20, 2021, at 6:11 PM, Léa Gris wrote:
> Le 21/08/2021 à 00:06, Chet Ramey écrivait :
> > The best way to clone an associative array is:
> >
> > declare -A options
> > eval options=\( "${assoc[@]@K}" \)
> >
> > The quoting @K performs is eval-safe.
> >
>
> Although I was not attempti
The fact that "${a[@]@K}" expands to a single word is surprising to me.
I know someone else already mentioned it in this thread (sorry, I forgot
who it was), but it would be nice if there were a similar one that gave
a list of multiple words.
unicorn:~$ printf '<%s> ' "${a[@]@Q}"; echo
<'1'> <'2'>
‐‐‐ Original Message ‐‐‐
On Friday, August 20, 2021 8:00 PM, Kerin Millar wrote:
> On Fri, 20 Aug 2021 19:28:25 +
> hancooper via Bug reports for the GNU Bourne Again SHell bug-bash@gnu.org
> wrote:
>
> > I am using EPOCHREALTIME and then computing the corresponding human
> > readab
Le 21/08/2021 à 00:59, Greg Wooledge écrivait :
The fact that "${a[@]@K}" expands to a single word is surprising to me.
I know someone else already mentioned it in this thread (sorry, I forgot
who it was), but it would be nice if there were a similar one that gave
a list of multiple words.
unico
On Fri, 20 Aug 2021 23:33:38 +
hancooper wrote:
> ‐‐‐ Original Message ‐‐‐
> On Friday, August 20, 2021 8:00 PM, Kerin Millar wrote:
>
> > On Fri, 20 Aug 2021 19:28:25 +
> > hancooper via Bug reports for the GNU Bourne Again SHell bug-bash@gnu.org
> > wrote:
> >
> > > I am usin
Robert Elz writes:
> | What seems to be the case with sh-style shells and Posix is that
> | all-caps variable names are subject to implementation-specific use, and
> | so users should not use them except when using them in the way that is
> | specific to the implementation the script is to
$ help command | grep -i -- -v
-vprint a description of COMMAND similar to the `type' builtin
-Vprint a more verbose description of each COMMAND
$ command -v cat
/bin/cat
$ type cat
cat is /bin/cat
$ command -V cat
cat is /bin/cat
So it turns out -V is like type, not -v!
Also
11 matches
Mail list logo