Skip to main content

> (truncate file)

Laurence MorganLess than 1 minute

> (truncate file)

Writes STDIN to disk - overwriting contents if file already exists

Description

Redirects output to file.

If a file already exists, the contents will be truncated (overwritten). Otherwise a new file is created.

Usage

<stdin> |> filename

Examples

g * |> files.txt

Synonyms

  • >
  • fwrite

See Also

  • Arrow Pipe (->) Token: Pipes STDOUT from the left hand command to STDIN of the right hand command
  • POSIX Pipe (|) Token: Pipes STDOUT from the left hand command to STDIN of the right hand command
  • STDERR Pipe (?) Token: Pipes STDERR from the left hand command to STDIN of the right hand command
  • <> / read-named-pipe: Reads from a Murex named pipe
  • >> (append file): Writes STDIN to disk - appending contents if file already exists
  • g: Glob pattern matching for file system objects (eg *.txt)
  • pipe: Manage Murex named pipes
  • tmp: Create a temporary file and write to it

This document was generated from builtins/core/io/file_doc.yamlopen in new window.

Last update:
Contributors: Laurence Morgan,Laurence Morgan,Laurence