github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/gen/parser/logical_ops_doc.yaml (about) 1 - DocumentID: logical-and 2 Title: >- 3 `&&` And Logical Operator 4 CategoryID: parser 5 Summary: >- 6 Continues next operation if previous operation passes 7 Description: |- 8 When in the **normal** run mode (see "schedulers" link below) this will only 9 run the command on the right hand side if the command on the left hand side 10 does not error. Neither STDOUT nor STDERR are piped. 11 12 This has no effect in `try` nor `trypipe` run modes because they automatically 13 apply stricter error handling. 14 Examples: |- 15 **Second command runs because the first command doesn't error:** 16 17 ``` 18 » out one && out two 19 one 20 two 21 ``` 22 23 **Second command does not run because the first command produces an error:** 24 25 ``` 26 » err one && out two 27 one 28 ``` 29 Detail: |- 30 This is equivalent to a `try` block: 31 32 ``` 33 try { 34 err one 35 out two 36 } 37 ``` 38 Related: 39 - pipe-err 40 - pipeline 41 - schedulers 42 - out 43 - err 44 - try 45 - trypipe 46 - logical-or 47 - elvis 48 49 50 51 - DocumentID: logical-or 52 Title: >- 53 `||` Or Logical Operator 54 CategoryID: parser 55 Summary: >- 56 Continues next operation only if previous operation fails 57 Description: |- 58 When in the **normal** run mode (see "schedulers" link below) this will only 59 run the command on the right hand side if the command on the left hand side 60 does not error. Neither STDOUT nor STDERR are piped. 61 62 This has no effect in `try` nor `trypipe` run modes because they automatically 63 apply stricter error handling. See detail below. 64 Examples: |- 65 **Second command does not run because the first command doesn't error:** 66 67 ``` 68 » out one || out two 69 one 70 ``` 71 72 **Second command does run because the first command produces an error:** 73 74 ``` 75 » err one || out two 76 one 77 two 78 ``` 79 Detail: |- 80 This has no effect in `try` nor `trypipe` run modes because they automatically 81 apply stricter error handling. You can achieve a similar behavior in `try` with 82 the following code: 83 84 ``` 85 try { 86 err one -> !if { out two } 87 } 88 ``` 89 90 There is no workaround for `trypipe`. 91 Related: 92 - pipe-err 93 - pipeline 94 - schedulers 95 - out 96 - err 97 - try 98 - trypipe 99 - logical-and 100 - elvis