4 ms·
ed is actually really handy in shell scripts when you want change something in a text file, and want to navigate in the text by following landmarks. Eg. if you
by zurn 14y ago
ed is actually really handy in shell scripts when you want change something in a text file, and want to navigate in the text by following landmarks. Eg. if you are editing an .ini file the sed or awk methods are much more cumbersome, with ed it's just a couple of navigation commands and a in-place replace and save.
Plus you get to try things out interactively and then
paste the working set of commands in your script. it's like sed with a repl, only better!
Example: https://groups.google.com/group/comp.unix.shell/msg/e823e275906f4079 https://groups.google.com/group/comp.unix.shell/msg/e823e275...