github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/docs/user-guide/namedpipes.md (about)

     1  # Named Pipes
     2  
     3  > A detailed breakdown of named pipes in Murex
     4  
     5  ## Background
     6  
     7  [Wikipedia describes](https://en.wikipedia.org/wiki/Named_pipe) a named pipe as the following:
     8  
     9  > In computing, a named pipe (also known as a FIFO for its behavior) is an
    10  > extension to the traditional pipe concept on Unix and Unix-like systems, and
    11  > is one of the methods of inter-process communication (IPC). The concept is
    12  > also found in OS/2 and Microsoft Windows, although the semantics differ
    13  > substantially. A traditional pipe is "unnamed" and lasts only as long as the
    14  > process. A named pipe, however, can last as long as the system is up, beyond
    15  > the life of the process. It can be deleted if no longer used. Usually a named
    16  > pipe appears as a file, and generally processes attach to it for IPC.
    17  
    18  Where Murex differs from standard Linux/UNIX is that named pipes are not
    19  special files but rather an object or construct within the shell runtime. This
    20  allows for more user friendly tooling and syntactic sugar to implemented around
    21  it while largely still having the same functionality as a more traditional file
    22  based named pipe.
    23  
    24  ## In Murex
    25  
    26  In Murex, named pipes are described in code as a value inside angle brackets.
    27  There are four named pipes pre-configured: `<in>` (STDIN), `<out>` (STDOUT),
    28  `<err>` (STDERR), and `<null>` (/dev/null equivalent).
    29  
    30  You can call a named pipe as either a method, function, or parameter.
    31  
    32  **As a method:**
    33  
    34  ```
    35  <in> -> command parameter1 parameter2 parameter3
    36  ```
    37  
    38  **As a function:**
    39  
    40  ```
    41  command parameter1 parameter2 parameter3 -> <out>
    42  ```
    43  
    44  **As a parameter:**
    45  
    46  ```
    47  command <out> <!err> parameter1 parameter2 parameter3
    48  ```
    49  
    50  ## See Also
    51  
    52  * [`<read-named-pipe>`](../parser/namedpipe.md):
    53    Reads from a Murex named pipe
    54  * [`<stdin>`](../commands/stdin.md):
    55    Read the STDIN belonging to the parent code block
    56  * [`test`](../commands/test.md):
    57    Murex's test framework - define tests, run tests and debug shell scripts
    58  
    59  <hr/>
    60  
    61  This document was generated from [gen/user-guide/named-pipes_doc.yaml](https://github.com/lmorg/murex/blob/master/gen/user-guide/named-pipes_doc.yaml).