Skip to content

Update logrotate_urbackupsrv - #118

Open
francoisPE wants to merge 1 commit into
uroni:devfrom
francoisPE:patch-1
Open

Update logrotate_urbackupsrv#118
francoisPE wants to merge 1 commit into
uroni:devfrom
francoisPE:patch-1

Conversation

@francoisPE

Copy link
Copy Markdown

@francoisPE

Copy link
Copy Markdown
Author

I propose that PR

@uroni

uroni commented Jan 6, 2025

Copy link
Copy Markdown
Owner

Usually && has precedence over ||. Is that not the case in bash?

@PhillipOConnor

PhillipOConnor commented Feb 11, 2025

Copy link
Copy Markdown

I believe && does not have precedence over || in the context as it is a list, not an expression. From "man bash":

A list is a sequence of one or more pipelines separated by one of the operators ;, &, &&, or ||, and optionally terminated by one of ;, &, or newline.
Of these list operators, && and || have equal precedence, followed by ; and &, which have equal precedence.
AND and OR lists are sequences of one or more pipelines separated by the && and || control operators, respectively. AND and OR lists are executed with left associativity.

In the context of an expression && does have precedence over ||

@uroni

uroni commented Feb 15, 2025

Copy link
Copy Markdown
Owner
~$ true && echo "A" || echo "B"
A
~$ false && echo "A" || echo "B"
B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants