← Back to tools
View AGENTS.md for choose
choose
A human-friendly and fast alternative to cut and awk
Description
choose is a simpler alternative to cut and awk for selecting fields from text. It uses intuitive field indexing, supports negative indices and ranges, and handles various delimiters with minimal syntax.
Install
homebrew
brew install choose-rustcargo
cargo install chooseAI Summary
A human-friendly alternative to cut and awk. Select fields from text using intuitive 0-based indexing, negative indices, and ranges with minimal syntax.
Capabilities
- + Intuitive 0-based field selection
- + Negative indices to select from the end
- + Range selection (e.g., 2:5, :3, -2:)
- + Custom field delimiters
Use When
- → Extracting columns from command output
- → Want simpler syntax than awk for field selection
- → Quick column extraction in pipelines
Avoid When
- x Need awk's full text processing capabilities
- x Scripts that must be portable to systems without choose
Usage Patterns
Select a specific field
echo 'one two three' | choose 1 Prints 'two' (0-based indexing)
Select a range of fields
echo 'a b c d e' | choose 1:3 Prints fields 1 through 3: 'b c d'
Input / Output
stdin: Delimited text data
stdout: Selected fields
Exit codes:
0 Success