On 12/27/24 4:52 PM, Павел Fortovey wrote:
    I apologize. I found out that this behavior is not a bug.

    I didn't think that bash is such a strange scripting language with its
    own interpretation of the concept of logic.

AND-OR lists are left-associative and || and && have equal priority.

Your example is equivalent to

{ { printf 1 && printf 2; } || { printf 3; }; } && { printf 4; }

All Bourne-style shells work like this.

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

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to