2022-02-14 02:22:51 +00:00
|
|
|
---
|
|
|
|
title: headers
|
|
|
|
layout: command
|
2022-03-04 12:10:09 +00:00
|
|
|
version: 0.59.1
|
2022-02-14 02:22:51 +00:00
|
|
|
---
|
2020-05-13 08:03:29 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
Use the first row of the table as column names.
|
2020-05-13 08:03:29 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
## Signature
|
|
|
|
|
|
|
|
```> headers ```
|
2020-05-13 08:03:29 +00:00
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
Returns headers from table
|
2020-05-13 08:03:29 +00:00
|
|
|
```shell
|
2022-02-14 02:22:51 +00:00
|
|
|
> "a b c|1 2 3" | split row "|" | split column " " | headers
|
2020-06-23 18:21:47 +00:00
|
|
|
```
|
2020-05-13 08:03:29 +00:00
|
|
|
|
2022-02-14 02:22:51 +00:00
|
|
|
Don't panic on rows with different headers
|
2020-06-23 18:21:47 +00:00
|
|
|
```shell
|
2022-02-14 02:22:51 +00:00
|
|
|
> "a b c|1 2 3|1 2 3 4" | split row "|" | split column " " | headers
|
2020-05-13 08:03:29 +00:00
|
|
|
```
|