On Mon, Jan 16, 2023, at 3:15 PM, Peng Yu wrote:
> On 1/16/23, Leonid Isaev <leonid.isaev@ifax.com> wrote:
>> if I know that an array "${a[@]}" can't be exported, and want to
>> export its 1st element, I will do just that: export a variable
>> "${a[0]}"...
>
> Then, you are then suggesting ${Z[0]} instead $Z for the first element
> of the Z array, for the same logic.
>
> I'd rather have $Z as a shorthand notation of ${Z[0]} for the fewer
> keystrokes. Bash is for command line interaction, every keystroke
> counts.
Not everyone agrees with your priorities and opinion on what bash
is "for". One could say (and I do) that brevity should not take
unqualified precedence over clarity and explicitness.
> If you want verbosity, you can use java.
This suggestion is unhelpful. "Verbosity" aside, Java and bash are
tailored for different use cases.
--
vq