save

Save a file.

Signature

> save (filename) --raw --append

Parameters

  • filename: the filename to use
  • --raw: save file as raw binary
  • --append: append input to the end of the file

Examples

Save a string to foo.txt in the current directory

> echo 'save me' | save foo.txt

Append a string to the end of foo.txt

> echo 'append me' | save --append foo.txt

Save a record to foo.json in the current directory

> echo { a: 1, b: 2 } | save foo.json