nushell/docs/commands/get.md

40 lines
642 B
Markdown
Raw Normal View History

---
title: get
layout: command
version: 0.59.0
---
2019-11-30 12:48:23 +01:00
Extract data using a cell path.
2019-11-30 12:48:23 +01:00
## Signature
```> get (cell_path) ...rest --ignore-errors```
2019-11-30 12:48:23 +01:00
## Parameters
- `cell_path`: the cell path to the data
- `...rest`: additional cell paths
- `--ignore-errors`: return nothing if path can't be found
2019-11-30 12:48:23 +01:00
## Examples
Extract the name of files as a list
2019-11-30 12:48:23 +01:00
```shell
> ls | get name
2019-11-30 12:48:23 +01:00
```
Extract the name of the 3rd entry of a file list
2019-11-30 12:48:23 +01:00
```shell
> ls | get name.2
2019-11-30 12:48:23 +01:00
```
Extract the name of the 3rd entry of a file list (alternative)
2019-11-30 12:48:23 +01:00
```shell
> ls | get 2.name
2019-11-30 12:48:23 +01:00
```
Extract the cpu list from the sys information record
2019-11-30 12:48:23 +01:00
```shell
> sys | get cpu
```