Live data from Hacker News

The Sed FAQ

pement.org

1–10 of 15 posts

Re: The Sed FAQ

#5
post #3

Why not publish MAN itself

Here you go!

http://man.freebsd.org/sed

also reading the ed man page will help as well for newbies.

--------------------------

IEEE Std 1003.1-2008 :

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ed...

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/ex...

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/se...

Re: The Sed FAQ

#6
post #4

My traditional reference for sed syntax (though hardly so well-explained, it can usually get the job done). https://www.google.com/search?q=sed+one+liners

I love seeing my blog posts at the top. :)

Re: The Sed FAQ

#8
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 d ~/.ssh/known_hosts and I'm done. Obviously I don't do that thoughtlessly otherwise I'd just disable ssh hosts checking altogether.

Re: The Sed FAQ

#9
post #8

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 d ~/.ssh/known_hosts and I'm done. Obviously I don't do that thoughtlessly otherwise I'd just disable ssh hosts checking altogether.

actually that's a perfect use case for ed

for example:

Offending key in /home/user/.ssh/known_hosts:12

ed .ssh/known_hosts

12d

w

q

Post reply on HN