help-bash
[Top][All Lists]
Advanced

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

checking whether an array `excl` is set


From: dora-solomon
Subject: checking whether an array `excl` is set
Date: Mon, 26 Jul 2021 05:27:25 +0200 (CEST)

From: Greg Wooledge <greg@wooledge.org>
To: help-bash@gnu.org
Subject: Re: checking whether an array `excl` is set
Date: 26/07/2021 05:06:23 Europe/Paris

On Mon, Jul 26, 2021 at 04:50:27AM +0200, dora-solomon@brusseler.com wrote:
>> Could I check whether an array `excl` is set using the command
>> if [[ -v excl ]]; then

>That does a thing. Whether the thing that that does is the thing that
>you want is a different question.

>What do you mean by "check whether an array is set"? Does it have
>to have at least one element in it, or does an empty array count?

>What are you actually trying to do?

I am making the array if a specific option to a function is specified by the 
user.



reply via email to

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