help-bash
[Top][All Lists]
Advanced

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

Re: Allowing dash in variable and function names


From: konsolebox
Subject: Re: Allowing dash in variable and function names
Date: Tue, 6 Apr 2021 13:25:56 +0800

On Tue, Apr 6, 2021 at 1:19 PM Koichi Murase <myoga.murase@gmail.com> wrote:
> Personally, I don't see the necessity, but if some additional
> separators in variable names are really useful for some people, ksh93
> namespaces might be newly supported. ksh93 supports namespaces of
> variables separated by dots.
>
> ksh$ a=1
> ksh$ a.hello=2
> ksh$ a.world=3
> ksh$ echo ${a.hello}
> 2
> ksh$ echo ${a.world}
> 3

This is truly helpful for keeping variables grouped to the name of their script.

-- 
konsolebox



reply via email to

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