39 lines
659 B
Markdown
39 lines
659 B
Markdown
# 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
|
|
|
|
```bash
|
|
zig build
|
|
```
|
|
|
|
## Testing
|
|
|
|
```bash
|
|
zig build test
|
|
```
|
|
|
|
## Example
|
|
|
|
```bash
|
|
# Replace all lines containing exactly "old text" with "new text"
|
|
./sed-lite -sL "old text" "new text" myfile.txt
|
|
```
|