knowledge/technology/applications/cli/choose.md

22 lines
1.2 KiB
Markdown
Raw Normal View History

2023-12-04 10:02:23 +00:00
---
obj: application
repo: https://github.com/theryangeary/choose
---
2024-03-19 08:25:42 +00:00
2023-12-04 10:02:23 +00:00
# choose
2024-01-17 08:44:04 +00:00
`choose`, a human-friendly and fast alternative to `cut` and (sometimes) `awk`
2023-12-04 10:02:23 +00:00
## Usage
```shell
choose [OPTIONS] <choices>...
choose 1 # Choose the the second element
choose -f" " 0:3 # Choose element 0 to 3 seperated by " "
```
## Options
| Option | Description |
| ------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
2024-01-17 08:00:45 +00:00
| `-f, --field-separator <field-separator>` | Specify field separator other than whitespace, using [Rust](../../dev/programming/languages/Rust.md) `regex` syntax |
2023-12-04 10:02:23 +00:00
| `-i, --input <input>` | Input file |
| `-o, --output-field-separator <output-field-separator>` | Specify output field separator |