Skip to main content

Truncate File (>)

Laurence MorganLess than 1 minuteOperators And TokensFilesystem OperationsPipes

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


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

Last update:
Contributors: Laurence Morgan