3 ms·
It isn't even about GNOME and GUIs, but things like this (http://news.ycombinator.com/item?id=1037509 http://news.ycombinator.com/item?id=1037509). You don't ne
by silentbicycle 17y ago
It isn't even about GNOME and GUIs, but things like this (http://news.ycombinator.com/item?id=1037509 http://news.ycombinator.com/item?id=1037509). You don't need to add an "overwrite in-place" option to sed when you can add it to everything by making it its own command. Unix design concerns how functionality is factored at the level between programs, not just between objects in a program.
See "cat -v considered harmful" (http://gaul.org/files/cat_-v_considered_harmful.html http://gaul.org/files/cat_-v_considered_harmful.html). GNU just does bloat bigger and better. (Compare BSD make and GNU make, for starters.)
- philh 17y agoThere are advantages to having overwrite-in-place as an option. If sed is passed a malformed expression, or for whatever reason is unable to operate, the file is untouched. A separate program would clobber it. Better to have the separate program than everything to implement its own version, but having both isn't necessarily bad.
- silentbicycle 17y ago> A separate program would clobber it. Nope, you can check the return value from the program(s) run inside of it and revert to the backup file if there's a problem. You really don't need it to be handled specifically by sed. There's actually an example script that does exactly that in _The Unix Programming Environment_, called 'overwrite', on page 154.
- deleted 17y ago[deleted]