2022-02-14 03:22:51 +01:00
|
|
|
---
|
|
|
|
title: save
|
|
|
|
layout: command
|
2022-03-04 13:10:09 +01:00
|
|
|
version: 0.59.1
|
2022-02-14 03:22:51 +01:00
|
|
|
---
|
2019-11-29 18:15:51 +01:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
Save a file.
|
2019-11-29 18:15:51 +01:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
## Signature
|
2019-11-29 18:15:51 +01:00
|
|
|
|
2022-03-09 14:05:35 +01:00
|
|
|
```> save (filename) --raw --append```
|
2019-11-29 18:15:51 +01:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
## Parameters
|
2019-11-29 18:15:51 +01:00
|
|
|
|
2022-02-14 03:22:51 +01:00
|
|
|
- `filename`: the filename to use
|
2022-02-21 18:26:00 +01:00
|
|
|
- `--raw`: save file as raw binary
|
2022-03-09 14:05:35 +01:00
|
|
|
- `--append`: append input to the end of the file
|
2019-11-30 21:07:43 +01:00
|
|
|
|
2022-02-21 18:26:00 +01:00
|
|
|
## Examples
|
|
|
|
|
|
|
|
Save a string to foo.txt in current directory
|
|
|
|
```shell
|
|
|
|
> echo 'save me' | save foo.txt
|
|
|
|
```
|
|
|
|
|
|
|
|
Save a record to foo.json in current directory
|
|
|
|
```shell
|
|
|
|
> echo { a: 1, b: 2 } | save foo.json
|
|
|
|
```
|