{"slug": "sed", "name": "sed", "category": "terminal", "category_name": "Terminal and shell", "description": "", "recommenders": 4, "commenters": 9, "warners": 0, "score": 4.882, "rising": -1.31, "first": "2025-11-19", "latest": "2026-08-12", "why": "the shell, awk, sed and other commands (Chapter 12) were invaluable", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 4, "neutral": 6, "compare": 0, "warn": 0}, "spark": [0, 0, 0, 2, 0, 1, 0, 1, 0, 0, 0, 0], "listed": true, "loved": [], "caveat": "", "short_quote": "the shell, awk, sed and other commands (Chapter 12) were invaluable", "icon": true, "domain": null, "github_repo": null, "official_url": "https://www.gnu.org/software/sed/", "pricing": "", "aliases": ["sed"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 777434608, "item_id": 48589663, "url": "https://news.ycombinator.com/item?id=48589663", "by": "wafflemaker", "date": "2026-06-18", "stance": "recommend", "quote": "If emacs is not installed on a system, I use sed.", "excerpt": "If emacs is not installed on a system, I use sed. In addition to not getting stuck inside it when you don't remember the magic exit incantation, you can immediately reuse the command on a different file. And it doesn't play sounds while you do it. Plus when you're typing the sed command, you can use emacs key bindings to move around!", "context": "", "use_case": "quick file edits", "switched_from": "", "story": "Emacs 31 Is Around the Corner: The Changes I'm Daily Driving"}, {"id": 765432785, "item_id": 47839549, "url": "https://news.ycombinator.com/item?id=47839549", "by": "k310", "date": "2026-04-20", "stance": "recommend", "quote": "the shell, awk, sed and other commands (Chapter 12) were invaluable", "excerpt": "Not very modern, but still a learning tool, Unix Text Processing [0] taught me tons about unix commands and utilities. It provided a foundation for things to come. Even if it's heavily into troff (we had DWB on the work computer) the shell, awk, sed and other commands (Chapter 12) were invaluable. Perl came later! > Unix Text Processing (Hayden Books) > Unix Text Processing, by Dale Dougherty and Tim O'Reilly, was pu", "context": "", "use_case": "text processing", "switched_from": "", "story": "The 800 page book that made me a web dev"}, {"id": 754622833, "item_id": 47163927, "url": "https://news.ycombinator.com/item?id=47163927", "by": "thesuperbigfrog", "date": "2026-02-26", "stance": "recommend", "quote": "It is good to know grep, sed, and awk", "excerpt": "grep, sed, and awk are nice simple tools but were followed by perl which is a more comprehensive tool and a complete programming language. perl advanced the state of the art for regular expressions such that most regular expression implementations are \"perl compatible\". From HN user unpythonic: \"When perl came out we were living in horrific times. You had the choice of either Bourne, C or Korn shell. Automation was g", "context": "", "use_case": "text processing", "switched_from": "", "story": "Grep, Sed, Awk \u2013 The Unix Text Processing Trinity"}, {"id": 754566836, "item_id": 47160427, "url": "https://news.ycombinator.com/item?id=47160427", "by": "dirk94018", "date": "2026-02-25", "stance": "recommend", "quote": "LaTeX, vim, sed, awk, the whole Unix toolkit is getting a new lease on life", "excerpt": "TexMacs is great. However, I use LaTeX regularly. Used to keep a cheat sheet of commands I'd forget between documents. Today I can describe what I want in plain English, pipe it through toast, and get the LaTeX back. LaTeX, vim, sed, awk, the whole Unix toolkit is getting a new lease on life, because their interfaces are text. Text in, text out. An LLM can write you a perfect \\begin{tikzpicture} on the first try. Cli", "context": "", "use_case": "", "switched_from": "", "story": "GNU Texmacs"}]}], "caveats": [], "who": [{"by": "ggm", "context": "long term Unix user", "url": "https://news.ycombinator.com/item?id=48615873", "date": "2026-06-20"}], "tags": [], "use_cases": ["text processing", "string replacement in shell", "text processing in pipes", "small scripts", "quick file edits"], "compared": [{"slug": "awk", "name": "awk", "co": 8, "switched_from": 0, "switched_to": 0}, {"slug": "vim", "name": "Vim", "co": 2, "switched_from": 0, "switched_to": 0}, {"slug": "emacs", "name": "Emacs", "co": 2, "switched_from": 0, "switched_to": 0}, {"slug": "vi", "name": "vi", "co": 2, "switched_from": 0, "switched_to": 0}, {"slug": "latex", "name": "LaTeX", "co": 2, "switched_from": 0, "switched_to": 0}], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=49197565", "title": "A shell exclamation mark is not for yelling. Be lazy", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=49016917", "title": "Using sed to make indexes for books (long)", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48984270", "title": "I wrote an bash enumerator because I was sick of xargs", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48822441", "title": "Amber the programming language compiled to Bash/Ksh/Zsh", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48615739", "title": "Is anyone still using Emacs?", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48584135", "title": "Emacs 31 Is Around the Corner: The Changes I'm Daily Driving", "mentions": 1}], "sentiment_by_month": {"2025-11": {"neutral": 1}, "2025-12": {}, "2026-01": {}, "2026-02": {"recommend": 2}, "2026-03": {}, "2026-04": {"recommend": 1}, "2026-05": {}, "2026-06": {"recommend": 1, "neutral": 1}, "2026-07": {"neutral": 3}, "2026-08": {"neutral": 1}, "2026-09": {}, "2026-10": {}}, "quotes": [{"id": 788355584, "item_id": 49272224, "url": "https://news.ycombinator.com/item?id=49272224", "by": "inigyou", "date": "2026-08-12", "stance": "neutral", "quote": "so I use sed", "excerpt": "ls | while read filename; do mv \"$filename\" \"$(echo \"$filename\" | sed \"s/_/./g\")\" || break; done I think there's a variable expansion syntax that does replacement, but I haven't learned it so I use sed. I find that piping to a while loop is often simpler and more flexible than something like you've written, but maybe not in this specific case with the weird string replacement syntax. However, mine doesn't have a comm", "context": "", "use_case": "string replacement in shell", "switched_from": "", "story": "A shell exclamation mark is not for yelling. Be lazy"}, {"id": 784985602, "item_id": 49061600, "url": "https://news.ycombinator.com/item?id=49061600", "by": "nyrikki", "date": "2026-07-26", "stance": "neutral", "quote": "With sed if you stuck with BRE and avoided ERE you were going to be more portable.", "excerpt": "When this post was written (1997 updated in 2001), awk wasn't very portable because you still had the awk,nawk,gawk flavors. With sed if you stuck with BRE and avoided ERE you were going to be more portable. But this email is a there because it is a bit of a feat of strength, thus why it was sent to the seders list. I wouldn't have used sed for all of this at the time, and I am wondering what they were using for publ", "context": "", "use_case": "text processing", "switched_from": "", "story": "Using sed to make indexes for books (long)"}, {"id": 783779889, "item_id": 48986243, "url": "https://news.ycombinator.com/item?id=48986243", "by": "ggm", "date": "2026-07-20", "stance": "neutral", "quote": "why I use egrep and sed in pipes along with awk", "excerpt": "The prior has a point because 98.89% of the time I type xargs -n 1 -0 and we are deep in the useless pipe argument which Rob Pike amongst others has rehearsed well. I do it because I do it, just like why I use egrep and sed in pipes along with awk.", "context": "", "use_case": "text processing in pipes", "switched_from": "", "story": "I wrote an bash enumerator because I was sick of xargs"}, {"id": 782071345, "item_id": 48879459, "url": "https://news.ycombinator.com/item?id=48879459", "by": "raffraffraff", "date": "2026-07-12", "stance": "neutral", "quote": "For small stuff I use bash / sed / awk / jq / yq / curl etc.", "excerpt": "For small stuff I use bash / sed / awk / jq / yq / curl etc. I stopped using perl (a long time ago) and hate trying to build or distribute anything in Python. \"You asked for a script! I give you... a venv, a pip install, woops need to compile something, so let's install build tools. Actually let's get github actions set up to handle this, or would you prefer a Docker image? Do you have a registry so I can share the i", "context": "", "use_case": "small scripts", "switched_from": "", "story": "Amber the programming language compiled to Bash/Ksh/Zsh"}, {"id": 777853971, "item_id": 48615873, "url": "https://news.ycombinator.com/item?id=48615873", "by": "ggm", "date": "2026-06-20", "stance": "neutral", "quote": "I use emacs, vi, ed, sed, awk all the time", "excerpt": "There has to be a version of Betteridges law for tech questions which obviously demand the answer \"yes\" I use emacs, vi, ed, sed, awk all the time as do countless other long term Unix users. I tried to reconnect to teco but found it a dialect of editing I no longer related to.", "context": "long term Unix user", "use_case": "text processing", "switched_from": "", "story": "Is anyone still using Emacs?"}, {"id": 777434608, "item_id": 48589663, "url": "https://news.ycombinator.com/item?id=48589663", "by": "wafflemaker", "date": "2026-06-18", "stance": "recommend", "quote": "If emacs is not installed on a system, I use sed.", "excerpt": "If emacs is not installed on a system, I use sed. In addition to not getting stuck inside it when you don't remember the magic exit incantation, you can immediately reuse the command on a different file. And it doesn't play sounds while you do it. Plus when you're typing the sed command, you can use emacs key bindings to move around!", "context": "", "use_case": "quick file edits", "switched_from": "", "story": "Emacs 31 Is Around the Corner: The Changes I'm Daily Driving"}, {"id": 765432785, "item_id": 47839549, "url": "https://news.ycombinator.com/item?id=47839549", "by": "k310", "date": "2026-04-20", "stance": "recommend", "quote": "the shell, awk, sed and other commands (Chapter 12) were invaluable", "excerpt": "Not very modern, but still a learning tool, Unix Text Processing [0] taught me tons about unix commands and utilities. It provided a foundation for things to come. Even if it's heavily into troff (we had DWB on the work computer) the shell, awk, sed and other commands (Chapter 12) were invaluable. Perl came later! > Unix Text Processing (Hayden Books) > Unix Text Processing, by Dale Dougherty and Tim O'Reilly, was pu", "context": "", "use_case": "text processing", "switched_from": "", "story": "The 800 page book that made me a web dev"}, {"id": 754622833, "item_id": 47163927, "url": "https://news.ycombinator.com/item?id=47163927", "by": "thesuperbigfrog", "date": "2026-02-26", "stance": "recommend", "quote": "It is good to know grep, sed, and awk", "excerpt": "grep, sed, and awk are nice simple tools but were followed by perl which is a more comprehensive tool and a complete programming language. perl advanced the state of the art for regular expressions such that most regular expression implementations are \"perl compatible\". From HN user unpythonic: \"When perl came out we were living in horrific times. You had the choice of either Bourne, C or Korn shell. Automation was g", "context": "", "use_case": "text processing", "switched_from": "", "story": "Grep, Sed, Awk \u2013 The Unix Text Processing Trinity"}, {"id": 754566836, "item_id": 47160427, "url": "https://news.ycombinator.com/item?id=47160427", "by": "dirk94018", "date": "2026-02-25", "stance": "recommend", "quote": "LaTeX, vim, sed, awk, the whole Unix toolkit is getting a new lease on life", "excerpt": "TexMacs is great. However, I use LaTeX regularly. Used to keep a cheat sheet of commands I'd forget between documents. Today I can describe what I want in plain English, pipe it through toast, and get the LaTeX back. LaTeX, vim, sed, awk, the whole Unix toolkit is getting a new lease on life, because their interfaces are text. Text in, text out. An LLM can write you a perfect \\begin{tikzpicture} on the first try. Cli", "context": "", "use_case": "", "switched_from": "", "story": "GNU Texmacs"}, {"id": 735744481, "item_id": 45984030, "url": "https://news.ycombinator.com/item?id=45984030", "by": "bawolff", "date": "2025-11-19", "stance": "neutral", "quote": "I use shell, vim, sed all the time", "excerpt": "I use shell, vim, sed all the time (awk less but i have used it). I've never used perl. I don't even know if i've ever even encountered a perl program that i wanted to look inside. I think its just one of those things, they lost mindshare and people stopped making stuff in perl. Network effects made it snowball from there. How often do you see code examples written in perl? Almost never. I see people write blogs with", "context": "", "use_case": "text processing", "switched_from": "", "story": "What Killed Perl?"}]}