[Top][All Lists]

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

Re: Conditional operator in Shell Arithmetic section

From: uzibalqa
Subject: Re: Conditional operator in Shell Arithmetic section
Date: Sat, 18 Mar 2023 22:56:03 +0000

------- Original Message -------
On Sunday, March 19th, 2023 at 10:25 AM, Lawrence Velázquez <> 

> On Sat, Mar 18, 2023, at 5:50 PM, uzibalqa wrote:
> > Think more about it. One cannot talk about how much when there in
> > none.
> I don't know what this means.

That there is not even one example.  So it is a long shot before we can think 
how much hand holding there should be.  But agree it should be cursory if we do 
not want a tutorial.
> > I am suggesting one example at least (perhaps a small final
> > subsection of the reference part).
> I do not think the bash manual needs an example for a feature that
> is this common. (Many, many, MANY languages have ? : or something
> like it. Do you want examples for + - * / too?)
> > It is not fine because it does not make it complete.
> The manual need not satisfy your personal notion of completeness.
> It makes external references where appropriate, like so:
> "The operators and their precedence, associativity, and values are
> the same as in the C language."

> > If we are so focused about a solely reference document, there
> > could be a tutorial with at least some examples for the esoteric
> > parts.
> You can find such material elsewhere. Any decent C teaching material
> can tell you how ? : works and how you might use it in practice. The
> official bash manual is not the only place to learn about such things
> (although finding good third-party material is admittedly fraught).

Glad you see that.  Most are mainly for real beginners making materials quite 
terse for those looking only to get some job done quite rapidly.
> Also: "esoteric" does not mean "something I don't understand".
> > I found it hard to find because it is not self evident that it only
> > applies to arithmetic operations and should be found there. Perhaps
> > have a link on the possibility of such conditional in case of
> > arithmetic.
> ((...))
> (( expression ))
> The arithmetic expression is evaluated according to the
> rules described below (see Shell Arithmetic).

I see it now that you have pointed it out.    
> In the HTML manual "Shell Arithmetic" is linked. There is nothing
> about ? : that merits a special call-out.

The title could be expanded to "Numeric Arithmetic and Conditional" from "Shell 

> Improvements to the index might be useful. Perhaps additional text
> to improve searchability (e.g., "ternary").
> --
> vq

reply via email to

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