help-bash
[Top][All Lists]
Advanced

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

Re: Best way to expand a boolean into a string when true


From: Stan Marsh
Subject: Re: Best way to expand a boolean into a string when true
Date: Mon, 02 Mar 2026 07:48:43 -0700

From:   Laurent Lyaudet
Subject: Re: Best way to expand a boolean into a string when true
Date:   Mon, 2 Mar 2026 15:03:31 +0100

Stan's second answer:
>> Postscript to previous post of mine:
>>
>> > One way to get this is redefine your problem spec slightly, so that
>> > your LFBFL_verbose variable is unset (or empty) rather than 0 to mean
>> > "no".  Any value (other than empty/null) means "yes".
>>
>> > Then you can do:
>>
>> > $ echo ${LFBFL_verbose:+--verbose}
>>
>> Or you could use the "ite()" function, which I posted here several
>> months ago.  It is a generalized/fancier version of the :+ test.

>Thanks, but the search here for "ite" only yields your last email.
>https://lists.gnu.org/archive/cgi-bin/namazu.cgi?query=ite&submit=Search&idxname=help-bash

Try:

https://lists.gnu.org/archive/html/bug-bash/2025-08/msg00029.html

Don't know why I posted it to bug-bash, but there it is...

=================================================================================
Please do not send me replies to my posts on the list.
I always read the replies via the web archive, so CC'ing to me is unnecessary.

When responding to my posts, please try to refrain from giving bureaucratic 
answers.
If you have nothing useful to say, then just click Next and go on.



reply via email to

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