github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/docs/parser/logical-and.md (about)

     1  # `&&` And Logical Operator
     2  
     3  > Continues next operation if previous operation passes
     4  
     5  ## Description
     6  
     7  When in the **normal** run mode (see "schedulers" link below) this will only
     8  run the command on the right hand side if the command on the left hand side
     9  does not error. Neither STDOUT nor STDERR are piped.
    10  
    11  This has no effect in `try` nor `trypipe` run modes because they automatically
    12  apply stricter error handling.
    13  
    14  
    15  
    16  ## Examples
    17  
    18  **Second command runs because the first command doesn't error:**
    19  
    20  ```
    21  » out one && out two
    22  one
    23  two
    24  ```
    25  
    26  **Second command does not run because the first command produces an error:**
    27  
    28  ```
    29  » err one && out two
    30  one
    31  ```
    32  
    33  ## Detail
    34  
    35  This is equivalent to a `try` block:
    36  
    37  ```
    38  try {
    39      err one
    40      out two
    41  }
    42  ```
    43  
    44  ## See Also
    45  
    46  * [Pipeline](../user-guide/pipeline.md):
    47    Overview of what a "pipeline" is
    48  * [Schedulers](../user-guide/schedulers.md):
    49    Overview of the different schedulers (or 'run modes') in Murex
    50  * [`?:` Elvis Operator](../parser/elvis.md):
    51    Returns the right operand if the left operand is falsy (expression)
    52  * [`?` STDERR Pipe](../parser/pipe-err.md):
    53    Pipes STDERR from the left hand command to STDIN of the right hand command (DEPRECATED)
    54  * [`err`](../commands/err.md):
    55    Print a line to the STDERR
    56  * [`out`](../commands/out.md):
    57    Print a string to the STDOUT with a trailing new line character
    58  * [`try`](../commands/try.md):
    59    Handles non-zero exits inside a block of code
    60  * [`trypipe`](../commands/trypipe.md):
    61    Checks for non-zero exits of each function in a pipeline
    62  * [`||` Or Logical Operator](../parser/logical-or.md):
    63    Continues next operation only if previous operation fails
    64  
    65  <hr/>
    66  
    67  This document was generated from [gen/parser/logical_ops_doc.yaml](https://github.com/lmorg/murex/blob/master/gen/parser/logical_ops_doc.yaml).