save for filesystem

Save a file.


> save (filename) --stderr --raw --append --force --progress


  • filename: the filename to use
  • --stderr {path}: the filename used to save stderr, only works with -r flag
  • --raw (-r): save file as raw binary
  • --append (-a): append input to the end of the file
  • --force (-f): overwrite the destination
  • --progress (-p): enable progress bar

Input/output types:



Save a string to foo.txt in the current directory

> 'save me' | save foo.txt

Append a string to the end of foo.txt

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

Save a record to foo.json in the current directory

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

Save a running program's stderr to foo.txt

> do -i {} | save foo.txt --stderr foo.txt

Save a running program's stderr to separate file

> do -i {} | save foo.txt --stderr bar.txt