|
|
|
|
|
by dalke
5114 days ago
|
|
Learn ed so that vi becomes easier - nice joke! More relevant is that I already know a bunch of tools for doing deletion of line 5. For example: perl -i -ne 'print unless $.==15' . It's more complicated, but it's a smaller number of tools for me to remember. Actually, I probably would have used mv to a temp file + awk 'NR!=15' + rm temp file. Even knowing perl and python I still use awk pretty often, and it comes to mind much easier than thinking about ed or sed. Plus, I still have the temp file around in case I need to revert a mistake, like if I accidentally typed '51' instead of '15'. |
|
I guess the benefits of 'ed' depend on your line of work though. For a systems administrator, I would make it a job-interview question.