help-bash
[Top][All Lists]
Advanced

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

Re: How to test if a variable is declared?


From: Chet Ramey
Subject: Re: How to test if a variable is declared?
Date: Mon, 14 Mar 2022 09:54:50 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.2

On 3/13/22 1:25 PM, Koichi Murase wrote:
2022年3月14日(月) 0:02 Alex fxmbsw7 Ratchev <fxmbsw7@gmail.com>:

[[ -v var ]] || printf not\\n

This thread is continued from the discussion two years ago. See the
original post of this thread where the reason that -v cannot be used
is explained: https://lists.gnu.org/archive/html/help-bash/2020-03/msg00015.html

That discussion remains unpersuasive, and this doesn't add anything new.
Peng resolutely refuses to use any of the existing mechanisms that can do
what he wants. It's a niche request, at least so far, and there is already
a way to do it.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

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