pos/sed-lite
2025-09-18 14:42:22 -07:00
..
src patched utilities.c / zig build test works with parser 2025-09-18 14:42:22 -07:00
build.zig we will need to patch utilities.c. Quick program for to do this 2025-09-18 10:18:17 -07:00
build.zig.zon we will need to patch utilities.c. Quick program for to do this 2025-09-18 10:18:17 -07:00
README.md we will need to patch utilities.c. Quick program for to do this 2025-09-18 10:18:17 -07:00

sed-lite

A minimal command line program for in-place file editing with exact line substitution.

Usage

sed-lite -sL "original string" "replacement string" <file>

Operations

  • -sL (substitute line): Replaces entire lines that exactly match the original string

Features

  • In-place editing using temporary files
  • Exact line matching (no regex or wildcards)
  • Safe atomic file replacement
  • Comprehensive error handling

Building

zig build

Testing

zig build test

Example

# Replace all lines containing exactly "old text" with "new text"
./sed-lite -sL "old text" "new text" myfile.txt