Re:Batch editing files with ed
by zokier on Saturday May 12, 2018 @02:09PM
(#17055245)
There is also ex, which is sort of cousin of ed, but also closer to nowdays more familiar vi(m).
[ Parent
| on HN ]
It's closer because vi was built on top of ex -- vi's ":" commands are just ex commands. In fact, on my Linux box, /bin/ex is just a symbolic link to /bin/vi:
$ ls -l /bin/ex
lrwxrwxrwx 1 root root 2 Oct 2 2017 /bin/ex -> vi
The original code for vi was written by Bill Joy in 1976, as the visual mode for a line editor called ex that Joy had written with Chuck Haley. Bill Joy's ex 1.1 was released as part of the first BSD Unix release in March 1978.[1](Bill Joy went on to become a co-founder of Sun Microsystems.)
"ex" stood for the extended version of ed.
ex == vi(m). Really, it's the same executable. You switch from vi to ex with Q, and from ex to vi with vi^M .
I loved ex's open mode. It's kind of a line-mode version of vi. Great to use over 1200 baud. Looks like vim doesn't have it. Sad.