help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] How to check a variable is global or local?


From: Koichi Murase
Subject: Re: [Help-bash] How to check a variable is global or local?
Date: Mon, 21 Jan 2019 22:53:15 +0900

> > used in Bash 4.2 and later. Also it has a slight overhead because it
> > uses a subshell.
>
> Sounds like a builtin probably would better as checking whether a
> variable is global or local should be cheep.

Thank you for the reply. As far as I know, there is no such builtin
functionality. If it would be implemented, I think address@hidden could have
a flag `g' so that it can be used as follows:

[[ address@hidden == *g* ]]

--
Regards,
Koichi



reply via email to

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