kojiro 1187288168 learn foo && bar || baz is not equivalent to 'if foo; then bar; else baz; fi. In the former case, baz will happen if *either* foo *or* bar return false. In the latter case, bar will only trigger if foo returns false, regardless of the exit code for bar. kojiro 1187288201 forget kojiro 1187288215 learn foo && bar || baz is not equivalent to 'if foo; then bar; else baz; fi'. In the former case, baz will happen if *either* foo *or* bar return false. In the latter case, bar will only trigger if foo returns false, regardless of the exit code for bar. kojiro 1187288607 forget kojiro 1187288628 learn foo && bar || baz is not equivalent to 'if foo; then bar; else baz; fi'. In the former case, baz will happen if *either* foo *or* bar return false. In the latter case, bar will only trigger if foo returns false, regardless of the exit code for bar. See http://wooledge.org/mywiki/BashPitfalls \amethyst 1276419919 forget \amethyst 1276419923 learn foo && bar || baz is not equivalent to 'if foo; then bar; else baz; fi'. In the former case, baz will happen if *either* foo *or* bar return false. In the latter case, baz will only trigger if foo returns false, regardless of the exit code for bar. See http://mywiki.wooledge.org/BashPitfalls larryv 1645413859 forget larryv 1645413871 learn foo && bar || baz is not equivalent to 'if foo; then bar; else baz; fi'. In the former case, baz will happen if *either* foo *or* bar return false. In the latter case, baz will only trigger if foo returns false, regardless of the exit code for bar. See https://mywiki.wooledge.org/BashPitfalls#pf22