| 1 | #!/usr/bin/env bash |
| 2 | # |
| 3 | # Miscellaneous tests for the command language. |
| 4 | |
| 5 | ### Chained && and || -- there is no precedence |
| 6 | expr 1 && expr 2 || expr 3 && expr 4 |
| 7 | echo "status=$?" |
| 8 | # stdout-json: "1\n2\n4\nstatus=0\n" |
| 9 | |
| 10 | ### Command block |
| 11 | { which ls; } |
| 12 | # stdout: /bin/ls |
| 13 |