Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

choose

> 编程语言
Open source

A human-friendly and fast alternative to cut (and sometimes awk)

2.3K stars0 likes2 views
WebsiteGitHub

About

A human-friendly and fast alternative to cut (and sometimes awk)

Choose

This is choose, a human-friendly and fast alternative to cut and (sometimes) awk

Features

  • terse field selection syntax similar to Python's list slices
  • negative indexing from end of line
  • optional start/end index
  • zero-indexed
  • reverse ranges
  • slightly faster than cut for sufficiently long inputs, much faster than awk
  • regular expression field separators using Rust's regex syntax

Rationale

The AWK programming language is designed for text processing and is extremely capable in this endeavor. However, the awk command is not ideal for rapid shell use, with its requisite quoting of a line wrapped in curly braces, even for the simplest of programs:

bash
awk '{print $1}'

Likewise, cut is far from ideal for rapid shell use, because of its confusing syntax. Field separators and ranges are just plain difficult to get right on the first try.

It is for these reasons that I present to you choose. It is not meant to be a drop-in or complete replacement for either of the aforementioned tools, but rather a simple and intuitive tool to reach for when the basics of awk or cut will do, but the overhead of getting them to behave should not be necessary.

Contributing

Please see our guidelines in contributing.md.

Usage

…

Examples

…

Compilation and Installation

Installing From Source

In order to build choose you will need the rust toolchain installed. You can find instructions here.

Then, to install:

bash
git clone https://github.com/theryangeary/choose.git
cd choose
cargo build --release
install target/release/choose <DESTDIR>

Just make sure DESTDIR is in your path.

Installing From Package Managers

Cargo:

bash
cargo install choose

Arch Linux:

bash
yay -S choose-rust-git

Fedora/CentOS COPR:

bash
dnf copr enable atim/choose
dnf install choose

Homebrew:

bash
brew install choose-rust

MacPorts:

bash
sudo port install choose

Benchmarking

See benchmarking

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rust

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言