Use of Root

John Chambers jc at trillian.mit.edu
Tue Feb 1 11:07:13 EST 2005


Jerry Feldman wrote:
| On Tuesday 01 February 2005 08:18, Gordon Marx wrote:
| > It's what I do at work, because they expect me to work with Vim
| > 5.something and no LaTeX, which I couldn't handle.
| Agreed. Sometimes I think IT people expect programmers to work using ed.

Heh.  I've occasionally been glad that in my early days  of
working on unix, I got very familiar with using ed and sed.
I've been faced with enough machines where fancier  editors
couldn't  be  used  sanely,  and  to  get the system out of
trouble, I had to use ed to fix up some damaged files.

Not that I'd want to do that for normal work.

I've also written quite a few scripts  that  invoke  ed  or
sed.   Not  so many in recent years, though.  When the idea
comes up, I usually ask myself if it's time to insert a few
dollars and semicolons, and convert the script to perl. The
answer is almost always "Yes." Then the editing can be done
in  the  script  without  a  subprocess,  and  with  a more
powerful editing language.

But I still have a number of scripts with code like:

ed $file <<EOF
...
w
q
EOF





More information about the Discuss mailing list