[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] && precedence
From: |
Pierre Gaston |
Subject: |
Re: [Help-bash] && precedence |
Date: |
Wed, 9 Aug 2017 15:10:13 +0300 |
On Wed, Aug 9, 2017 at 2:35 PM, Russell Shaw <address@hidden> wrote:
> Hi,
> When i do:
>
> true || echo hi
>
> there is no "hi" as expected
>
>
> when i do:
>
> true || true && echo hi
>
> i get "hi" echoed. Why does "true && echo hi" get evaluated?
>
>
The manual says:
"Of these list operators, && and ││ have equal precedence"
Take care that you also have && and || inside [[ ]] where they do not