| Crates.io | sed |
| lib.rs | sed |
| version | 0.1.1 |
| created_at | 2022-08-15 08:20:02.164829+00 |
| updated_at | 2025-12-17 20:55:00.142978+00 |
| description | sed ~ implemented as universal (cross-platform) utils, written in Rust |
| homepage | https://github.com/uutils/sed |
| repository | https://github.com/uutils/sed |
| max_upload_size | |
| id | 645791 |
| size | 677,987 |
Rust reimplementation of the sed utility with some GNU sed, FreeBSD sed, and other extensions.
At this state sed implements all POSIX commands and can run correctly the two complex scripts of its integration tests: hanoi.sed (solves the Towers of Hanoi puzzle) and math.sed (implements an arbitrary precision integer math calculator).
The performance of this Rust implementation is now better than the GNU and FreeBSD implementations for most benchmarked cases.
Further work aims to:
Ensure you have Rust installed on your system. You can install Rust through rustup.
Clone the repository and build the project using Cargo:
git clone https://github.com/uutils/sed.git
cd sed
cargo build --release
cargo run --release
The binary is named sed in target/release/sed.
--) form.I can be used in as a synonym for the i (case insensitive) substitution
flag.\n, other escape sequences (octal, hex, C) are supported
in the strings of the y command.
Under POSIX these yield undefined behavior.a, c, and i commands do not require an initial backslash,
allow text to appear on the same line, and support escape sequences
in the specified text.\0 is a synonym for &.Q command (optionally followed by an exit code) quits immediately.q command can be optionally followed by an exit code.l command can be optionally followed by the output width.--follow-symlinks flag for in-place editing.-i flag.\uXXXX or \UXXXXXXXX sequences.l command lists Unicode characters using the \uXXXX and \UXXXXXXXX
sequences.$) address is interpreted as the last non-empty line of
the last file. If files specified in subsequent arguments until the last
one are empty, then the last line condition will never be triggered.
This behavior is consistent with the
original implementation.sed is licensed under the MIT License - see the LICENSE file for details