Skip to content

Releases: johnmorrow/pk

v2.0.0 - Rust Rewrite

06 Mar 17:43

Choose a tag to compare

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/pk

Or 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

06 Mar 06:14

Choose a tag to compare

What's Changed

Bug Fixes

  • Fix segfault when combining -e (empty fields) with -b, -T, or -E and trailing/leading delimiters (#9)
  • Fix crash when field index 0 is used — now treated as a literal string (#10)
  • Fix reversed ranges like 4..2 silently producing empty output — now normalized to 2..4 (#11)
  • Fix memory leak when -d flag overrides default delimiters (#12)
  • Fix memory leak when -E flag overrides PK_EXCLUDES environment 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/--quotes flag 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 install

On 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

31 Jul 15:08

Choose a tag to compare

  • 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

26 Jul 18:03

Choose a tag to compare

  • Fixed bugs parsing some ranges.
  • Added getline implementation using fgetln to hopefully fix Mac OS X 10.6.8 compilation.

pk - Initial release

25 Jul 19:56

Choose a tag to compare

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