"command" help page

2021-08-20 Thread 積丹尼 Dan Jacobson
$ 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

Re: GROUPS

2021-08-20 Thread Dale R. Worley
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

Re: Exclamation mark when using character classes

2021-08-20 Thread Kerin Millar
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

Re: @K transformation

2021-08-20 Thread Léa Gris
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

Exclamation mark when using character classes

2021-08-20 Thread hancooper
‐‐‐ 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

Re: @K transformation

2021-08-20 Thread Greg Wooledge
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'>

Re: @K transformation

2021-08-20 Thread Lawrence Velázquez
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

Re: @K transformation

2021-08-20 Thread Léa Gris
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

Re: @K transformation

2021-08-20 Thread Chet Ramey
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

Re: Exclamation mark when using character classes

2021-08-20 Thread Kerin Millar
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:]

Exclamation mark when using character classes

2021-08-20 Thread hancooper via Bug reports for the GNU Bourne Again SHell
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