1. 19
  1.  

  2. 10

    First off, this is hilarious:

    ❗ This post is over ten years old. It may no longer be up to date. Opinions may have changed.

    No, ed is timeless in its unmatched might! :)

    Anyway…

    Back in the bad old days when Linux wasn’t a thing and myriad workstation vendors with frustratingly incompatible UNIx versions held sway, being a system administrator was painful, and just ONE of those pain categories was trying to keep your $TERMINAL variable and your actual terminal in sync, as well as ensuring that the system you’re on had the right terminfo/termcap nubbins.

    In short, Curses based applications were as always awesome but SUPER dicey at times, and when the chips were down and production was in jeopardy, my personal bacon was saved more than once by being able to connect to the server and edit that zorched configuration file with ed :)

    ed /etc/mission_critical.cf
    /BROKEN_THING
    s/BUSTED/WORKING/
    1,$p
    w
    w!
    q
    

    :)

    Yup. Still rattling around in there somewhere :)

    1. 6

      First off, this is hilarious:

      ❗ This post is over ten years old. It may no longer be up to date. Opinions may have changed.
      

      No, ed is timeless in its unmatched might! :)

      That’s an auto-generated piece my self written static site generator adds to every article over one year old, but, for ed I agree it could probably skip it. Not configurable though.

      I saw that at @jlelse’s site and thought it was a nice feature.

    2. 6

      For anyone who wants more detailed introductions to ed, you can’t go wrong with Brian Kernighan. These are both PDF links.

      1. 2

        These are really cool. Thank you for digging them up!

        1. 3

          Like so many people, I am a huge fan of Kernighan. He writes so clearly.

          Also, if you like that, you will probably love this: UNIX Programmer’s Manual. It’s from 1983, and has those two pieces by Kernighan, plus others of his, Stephen Bourne on shell scripting, Ritchie on C, and lots more.

          1. 2

            Like so many people, I am a huge fan of Kernighan. He writes so clearly.

            He does. K&R is an exemplary programming text, and that’s coming from someone who is a bit of a C hater. A lot of the Unix people from Bell Labs were skilled technical writers. I wonder just how much that contributed to Unix’s success.

      2. 4

        I believe the perfect ed cheat sheet merely consists of:

        ?

        1. 4

          Ed is generous enough to flag errors.

        2. 3

          I have tried both TECO and Ed text editors. Neither are my favourite. I also have used QED (Tilbrook’s version of the Pike/Duff/Redelmeier/Tilbrook edition) and for a while became reasonably proficient. This was because I worked with David Tilbrook, and I was amazed by his productivity and fluidity using this editor, which is fully programmable and resembles a command-line EMACS.

          References:

          1. 2

            ed doesn’t work as a regular work-a-day editor.

            It’s mostly intended for scripting or for cases where curses doesn’t make sense.

          2. 2

            ed is so cool it even has a conference https://twitter.com/ed1conf

            I’m looking forward to attending if they organize it again