Auto-generate markdown command docs (#4451)

* Finish updating

* a couple improvements

* Update renames

* cleanup examples
This commit is contained in:
JT
2022-02-13 21:22:51 -05:00
committed by GitHub
parent 06f5affc0b
commit 8c0a2d3c15
478 changed files with 7676 additions and 8045 deletions

View File

@ -1,30 +1,17 @@
# save
---
title: save
layout: command
version: 0.59.0
---
This command saves the contents of the pipeline to a file. Use this in combination with the `to json`, `to csv`, ... commands to save the contents in the specified format.
Save a file.
Syntax: `save (path) {flags}`
## Signature
```> save (filename) --raw```
## Parameters
* `(path)` the path to save contents to
- `filename`: the filename to use
- `--raw`: open file as raw binary
### Flags
--raw
treat values as-is rather than auto-converting based on file extension
## Example
You can save the name of files in a directory like this:
```shell
> ls | where type == File | select name | save filenames.csv
```
Or you can format it in supported formats using one of the `to` commands:
```shell
> ls | where type == File | select name | to csv | save filenames
```
`filename.csv` and `filenames` are both `csv` formatted files. Nu auto-converts the format if a supported file extension is given.