- DocumentID: tmp
  Title: >+
    `tmp`
  CategoryID: commands
  Summary: >-
    Create a temporary file and write to it
  Description: |-
    `tmp` creates a temporary file, writes the contents of STDIN to it then returns
    its filename to STDOUT.

    You can optionally specify a file extension, for example if the temporary file
    needs to be read by `open` or an editor which uses extensions to define syntax
    highlighting.
  Usage: |-
    ```
    <stdin> -> tmp [ file-extension ] -> <stdout>
    ```
  Examples: |-
    ```
    » out: "Hello, world!" -> set: tmp
    
    » out: $tmp
    /var/folders/3t/267q_b0j27d29bnf6pf7m7vm0000gn/T/murex838290600/8ec6936c1ac1c347bf85675eab4a0877-13893
    
    » open: $tmp
    Hello, world!
    ```
  Detail: |-
    The temporary file name is a base64 encoded md5 hash of the time plus Murex
    function ID with Murex process ID appended:

    ```go
    {{ include "builtins/core/io/tmp.go" }}
    ```

    This should should provide enough distance to run `tmp` in parallel....should
    you ever want to.
    
    `tmp` files are also located inside a unique per-process Murex temp directory
    which itself is located in the appropriate temp directory for the host OS (eg
    `$TMPDIR` on macOS).
  Synonyms:
  Related:
    - open
    - greater-than
    - greater-than-greater-than
    - pipe
