# sed

35 Hacker News commenters recommended sed and 13 criticized it, November 2025 to November 2026. It was recommended in 11 of 13 months. It meets the Hacker Approved badge rule.

**Verdict:** Built-in Unix stream editor for find-and-replace and text edits in scripts and pipelines, valued for ubiquity and terse one-liners. Caveat: macOS BSD and GNU versions differ in syntax.

## Why people recommend it

- Reusable in pipelines and scripts (5 comments): "the functional equivalent of find . -iname '*.csproj' | xargs sed -E -i.bak" ([source](https://news.ycombinator.com/item?id=50010206)) "you can immediately reuse the command on a different file" ([source](https://news.ycombinator.com/item?id=48589663)) "When I code I stream via sed for maximum efficiency." ([source](https://news.ycombinator.com/item?id=47963459))
- Available on nearly every Unix system (3 comments): "knowing a bit awk, perl and sed might help as well, as they tend to be available by default." ([source](https://news.ycombinator.com/item?id=48990264)) "The best part about sed is that it can generally be found in any *nix system." ([source](https://news.ycombinator.com/item?id=47511479)) "Mostly it's useful in my experience on systems without Perl installed" ([source](https://news.ycombinator.com/item?id=47492301))
- Well-established tool for text processing (3 comments): "Access to a well-established set of tools for operating on unstructured text" ([source](https://news.ycombinator.com/item?id=49018512)) "Three tools born in Bell Labs that still power every server, every pipeline" ([source](https://news.ycombinator.com/item?id=47163199)) "well established and solid unix toolchain" ([source](https://news.ycombinator.com/item?id=48859511))
- Skills transfer to other tools (2 comments): "thinking about pattern matching is fun, it's a little puzzle solved with a skillset that transfers to other cli tools" ([source](https://news.ycombinator.com/item?id=49250995)) "sed is something everyone had to learn, even if they did not realize it" ([source](https://news.ycombinator.com/item?id=47491487))

## What people warn about

- Differs between BSD and GNU versions (4 comments): "GNU programs do lots of things poorly, starting with "echo -e" and "cat -n" and continuing through to tools like awk and sed." ([source](https://news.ycombinator.com/item?id=50279264)) "sed has different syntax on macos because macos is based on BSD." ([source](https://news.ycombinator.com/item?id=48396495)) "Mutating a file in place, and needing a GNU extension for it." ([source](https://news.ycombinator.com/item?id=46251881))
- Hard to remember syntax (2 comments): "I still have to do a search (or use an LLM) to do anything useful with sed, xargs, etc." ([source](https://news.ycombinator.com/item?id=46180251)) "sed might take several attempts to get results" ([source](https://news.ycombinator.com/item?id=49656227))
- awk or Perl often preferred (2 comments): "I wish I'd invested that effort in learning perl oneliners instead" ([source](https://news.ycombinator.com/item?id=47491515)) "awk is so much better than sed to learn" ([source](https://news.ycombinator.com/item?id=45933347))

## Alternatives hackers recommend

- [fzf](https://hackerapproved.com/p/fzf.md): 78 recommend
- [jq](https://hackerapproved.com/p/jq.md): 75 recommend
- [grep](https://hackerapproved.com/p/grep.md): 65 recommend
- [Atuin](https://hackerapproved.com/p/atuin.md): 63 recommend
- [GitHub CLI](https://hackerapproved.com/p/github-cli.md): 49 recommend

## Cite as

Hacker Approved, "sed", https://hackerapproved.com/p/sed/ (counts from 1,795,640 Hacker News comments, November 2025 to November 2026).
