help-bash
[Top][All Lists]
Advanced

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

Re: whats wrong with (( a = 8 , a > 4 && a -= 2 || a-- )) , bash: ((: a


From: Bipul kumar
Subject: Re: whats wrong with (( a = 8 , a > 4 && a -= 2 || a-- )) , bash: ((: a = 8 , a > 4 && a -= 2 || a-- : attempted assignment to non-variable (error token is "-= 2 || a-- ")
Date: Fri, 24 Mar 2023 00:22:59 +0530

Are you saying to me?
I'm using simple gmail.


*> *$ (( a = 2 , a > 1 && (a -= 2) || a-- )); declare -p adeclare --
a="-1"**

It was not my statement or question.

I have  just answer the question being asked why
(( a = 2 , a > 1 && (a -= 2) || a-- ));  gives the value of a  = -1
And it was simple because the logical expression at `a > 1 && (a -= 2)`
was failed here  so the OR ||  part  has increase  0 -1 =  -1

Thank you

    Respectfully,
    Bipul
    PUBLIC KEY <http://ix.io/1nWf>
    97F0 2E08 7DE7 D538 BDFA  B708 86D8 BE27 8196 D466
                    ** Please excuse brevity and typos. **


On Fri, Mar 24, 2023 at 12:00 AM Greg Wooledge <greg@wooledge.org> wrote:

> On Thu, Mar 23, 2023 at 11:48:03PM +0530, Bipul kumar wrote:
> > *$ (( a = 2 , a > 1 && (a -= 2) || a-- )); declare -p adeclare -- a="-1"*
>
> I don't know what kind of email software you're using, but this mangling
> really makes it hard to read.
>
> As near as I can tell, the quoted part of your message was intended
> to appear as two lines of text.  But for whatever reason, your email
> program has chosen to remove the newline characters, place an asterisk
> at the beginning, place another asterisk at the end, and then place a
> newline character at the end (after the second added asterisk).
>
> The result is a single long line of text, where the reader will have to
> ignore the decorative asterisks, and guess where the newlines should go.
>
> The truly baffling thing, though, is that your email software did *not*
> send an HTML part and a text part.  I could understand it a litle more
> easily if you had originally written the message in HTML format, and then
> your email software did an automatic (and poor quality) conversion to
> text, and attached both formats.  I've seen that many times.
>
> But that's not what you're sending out.  Your email only contained one
> text part.  No second part.  So, there isn't even a "less mangled" form
> of the content to use as a reference.
>
>


reply via email to

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