TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The Sed FAQ

57 pointsby reader_1000about 12 years ago

7 comments

praptakabout 12 years ago
My favourite use case is when ssh complains about a host key being changed. I just substitute the offending line number into this: sed -i <line_no>d ~/.ssh/known_hosts and I'm done. Obviously I don't do that thoughtlessly otherwise I'd just disable ssh hosts checking altogether.
评论 #5508120 未加载
评论 #5510522 未加载
nickporterabout 12 years ago
I always have problems when running sed, especially with capture groups. I can never get the syntax right for non-trivial stuff.<p>I wish there was a sed-like tool that used python or javascript regex syntax!
评论 #5508921 未加载
McUsrabout 12 years ago
Hello. It is always nice with more stuff on sed, Here is a nice link for those wanting to learn the basics: <a href="http://www.grymoire.com/Unix/Sed.html" rel="nofollow">http://www.grymoire.com/Unix/Sed.html</a>
ISLabout 12 years ago
My traditional reference for sed syntax (though hardly so well-explained, it can usually get the job done).<p><a href="https://www.google.com/search?q=sed+one+liners" rel="nofollow">https://www.google.com/search?q=sed+one+liners</a>
评论 #5507722 未加载
eluxabout 12 years ago
Needs a single page HTML version.<p>Single page text version here: <a href="http://www.pement.org/sed/sedfaq.txt" rel="nofollow">http://www.pement.org/sed/sedfaq.txt</a>
babuskovabout 12 years ago
Nice collection of one-liners:<p><a href="http://sed.sourceforge.net/sed1line.txt" rel="nofollow">http://sed.sourceforge.net/sed1line.txt</a>
j0hnsn0wabout 12 years ago
Why not publish MAN itself
评论 #5507578 未加载