In this command, if curl succeeds, then
res
will be set to the output of curl. It seems =
has higher precedence than ||
.
res=$(curl -s "http://example.com ")||true
But ||
should have higher precedence than =
according to this link: https://tldp.org/LDP/abs/html/opprecedence.html
What is going on?
Asked by lamplet
(35 rep)
Jul 24, 2024, 04:01 AM
Last activity: Jul 24, 2024, 02:28 PM
Last activity: Jul 24, 2024, 02:28 PM