News for hackers. Stuff that matters.
Re:Actually using Ed by ythapa on Saturday June 16, 2012 @09:32PM (#4121976)
I think sed pretty much displaced ed. I still use ed but sed offers the same functionality and it's easier to script. One exception is the j command for joining lines.

For better or worse, in some of today's base Linux distributions, you might find ed missing. You will almost always find sed though.

Re:Actually using Ed by ralph on Sunday June 17, 2012 @08:05AM (#4122771)
sed is great but it's a stream editor; try moving the last line to the start of the file.
Re:Actually using Ed by tbe on Sunday June 17, 2012 @05:30PM (#4123896)
sed '$G;1h;1!H;$!d'
Re:Actually using Ed by ralph on Sunday June 17, 2012 @07:19PM (#4124157)
Nice try, but efficiency aside, it breaks.

    $ sed '$G;1h;1!H;$!d' <<<foo | hd
    00000000  66 6f 6f 0a 0a             |foo..|
    00000005
    $