Releases: johnmorrow/pk
Releases · johnmorrow/pk
v2.0.0 - Rust Rewrite
pk 2.0.0
Complete rewrite in Rust, replacing the C codebase and autotools build system.
What's new
- Drop-in replacement — identical CLI interface and behavior
- 2–3x faster thanks to buffered I/O
- Simpler builds — just
cargo build --release, no autotools/argp dependencies - Includes all bug fixes from v1.1.0
Install
cargo install --git https://github.com/johnmorrow/pkOr download a prebuilt binary below:
| Platform | Binary |
|---|---|
| Linux x86_64 | pk-linux-amd64 |
| macOS arm64 | pk-macos-arm64 |
pk 1.1.0 — Bug fixes and documentation updates
What's Changed
Bug Fixes
- Fix segfault when combining
-e(empty fields) with-b,-T, or-Eand trailing/leading delimiters (#9) - Fix crash when field index
0is used — now treated as a literal string (#10) - Fix reversed ranges like
4..2silently producing empty output — now normalized to2..4(#11) - Fix memory leak when
-dflag overrides default delimiters (#12) - Fix memory leak when
-Eflag overridesPK_EXCLUDESenvironment variable (#13) - Fix integer overflow in field number parsing — huge numbers no longer silently wrap (#14)
Documentation
- Fixed range syntax in manpage: was documenting
-but code uses.. - Added missing
-q/--quotesflag to OPTIONS section in manpage - Added CLAUDE.md with build instructions and architecture overview
- Added badges to README
Tests
- Added 7 new test cases covering all fixed bugs (48 total, up from 41)
Install
Download pk-1.1.0.tar.gz below, then:
tar xzf pk-1.1.0.tar.gz
cd pk-1.1.0
./configure && make && sudo make installOn macOS, install dependencies first: brew install argp-standalone and pass CFLAGS="-I/opt/homebrew/include" LDFLAGS="-L/opt/homebrew/lib" to configure.
Include tests in tarball
- Tests now included in dist tarball for "make test"
- Test script now runs on Mac OS X
Range bug fix and Mac OS X fix
- Fixed bugs parsing some ranges.
- Added getline implementation using fgetln to hopefully fix Mac OS X 10.6.8 compilation.
pk - Initial release
pk is a command line utility for easily extracting columns from text.
Initial version supports:
- variable delimiters
- fixed file formats
- CSV
- quoted fields
- escaped delimiters