| Crates.io | ock |
| lib.rs | ock |
| version | 0.1.1 |
| created_at | 2022-11-20 15:41:38.958972+00 |
| updated_at | 2025-09-08 19:38:09.274568+00 |
| description | A simple, fast command line utility for working with table-like data |
| homepage | |
| repository | https://github.com/williamwmarx/ock |
| max_upload_size | |
| id | 719174 |
| size | 149,711 |
ock is a lightweight command-line tool for slicing tabular data. It covers many everyday awk tasks with a simpler, faster interface.
The project started as an effort to learn Rust and forget awk. It became useful enough for me and I stopped maintaining it. Now, thanks to the fine folks at Anthropic and OpenAI making the cost of code maintenance ~zero, the project is back under active development.
cargo install ock
cargo binstall ock
Download pre-built binaries for your platform from the releases page.
Available for:
ps aux | ock -c pid,command # by header
ps aux | ock -c 1,3 # by index
ps aux | ock -c pid -r 0:10 # first ten rows
ps aux | ock -r -5: # last five rows
ps aux | ock -r 'python(2|3)' # rows matching a pattern
ps aux | ock -c '/^pid|cmd$/' # columns by regex
ock -r 1:10 -c 1,5 --column-delimiter ',' data.csv
ps aux | ock -c pid,command -r 'python'
Out-of-bounds selections produce a warning and no output.
MIT license. See LICENSE for details.