choose
A command-line tool for selecting fields from text with an intuitive syntax inspired by Python list slicing. A more
user-friendly alternative to cut that often outperforms awk for simple field selection.
Features
- Python-like slicing syntax with ranges and negative indices
- Zero-indexed field numbering with support for fields from the end of a line
- Fast performance compared to traditional
awkandcut - Custom field separators including regular expressions
- Simple, readable command syntax
Basic usage
# Select the first field.
choose 0
# Select fields 0, 1, and 2.
choose 0:3
# Select the last field using negative indexing.
choose -1
# Select multiple specific fields.
choose 0 2 4
# Use a custom field separator.
choose -f ':' 0 4