@Kusalananda
echo
can fail, because stdout is not always writable. That's one reason I try to stay away from writing stuff like
foo && bar || baz
to simulate a ternary conditional operator. Besides being really confusing later (as
Kiwy says), it's also very easy to expect that
bar
can't have a nonzero exit status, and then either sometimes it does or it gets replaced with something else that does.