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

     1  # `|>` Truncate File
     2  
     3  > Writes STDIN to disk - overwriting contents if file already exists
     4  
     5  ## Description
     6  
     7  Redirects output to file.
     8  
     9  If a file already exists, the contents will be truncated (overwritten).
    10  Otherwise a new file is created.
    11  
    12  ## Usage
    13  
    14  ```
    15  <stdin> |> filename
    16  ```
    17  
    18  ## Examples
    19  
    20  ```
    21  g * |> files.txt
    22  ```
    23  
    24  ## Synonyms
    25  
    26  * `|>`
    27  * `>`
    28  * `fwrite`
    29  
    30  
    31  ## See Also
    32  
    33  * [`->` Arrow Pipe](../parser/pipe-arrow.md):
    34    Pipes STDOUT from the left hand command to STDIN of the right hand command
    35  * [`<read-named-pipe>`](../parser/namedpipe.md):
    36    Reads from a Murex named pipe
    37  * [`>>` Append File](../parser/greater-than-greater-than.md):
    38    Writes STDIN to disk - appending contents if file already exists
    39  * [`?` STDERR Pipe](../parser/pipe-err.md):
    40    Pipes STDERR from the left hand command to STDIN of the right hand command (DEPRECATED)
    41  * [`g`](../commands/g.md):
    42    Glob pattern matching for file system objects (eg `*.txt`)
    43  * [`pipe`](../commands/pipe.md):
    44    Manage Murex named pipes
    45  * [`tmp`](../commands/tmp.md):
    46    Create a temporary file and write to it
    47  * [`|` POSIX Pipe](../parser/pipe-posix.md):
    48    Pipes STDOUT from the left hand command to STDIN of the right hand command
    49  
    50  <hr/>
    51  
    52  This document was generated from [builtins/core/io/file_doc.yaml](https://github.com/lmorg/murex/blob/master/builtins/core/io/file_doc.yaml).