uutils_

sed Alpha

user@machine:~$ man sed

uutils sed is a work-in-progress Rust reimplementation of GNU sed, the stream editor for filtering and transforming text.

This project aims to be a drop-in replacement for GNU sed, supporting the full range of sed scripts and command-line options.

GNU test results

Note: This project is still in early development. Many features are not yet implemented and behavior may differ from GNU sed.

Goals

Implement a cross-platform, memory-safe sed that is compatible with GNU sed scripts and command-line interface.

Beyond GNU

GNU reports every error as a single line on stderr, which says what went wrong but not where. A sed script is a small language, so when it fails to parse at a terminal, uutils sed echoes it back and points a caret at the part that is at fault, the way a compiler does. Try it in the playground.

Scripts and pipes still get the plain GNU one-line message. See Pointing at the error for how it works.

Installation

Homebrew (macOS, Linux)

brew install uutils-sed

The command is installed as uu-sed. To use it under its normal name, add the uubin directory to your PATH:

export PATH="$(brew --prefix)/opt/uutils-sed/libexec/uubin:$PATH"

See the Homebrew formula.

Debian

Available in Debian unstable:

sudo apt install rust-sed

The command is installed as rust-sed; the unprefixed binary is available at /usr/lib/cargo/bin/sed/sed.

See the Debian package tracker.

Contributing

To contribute to uutils sed, please see CONTRIBUTING.

License

uutils sed is licensed under the MIT License - see the LICENSE file for details.

GNU sed is licensed under the GPL 3.0 or later.