Matthew Woehlke wrote on 13-11-06 17:56:
Actually, dos2unix (the one I have, anyway) *does* do a few things that aren't so trivially done with sed. For one, it is in-place (unless told otherwise), and has --keepdate. In-place is awkward to do with sed.
At present I have my own shell script (using sed) that does exactly that, keep the date, using two small home-written binary utilities to preserve the time. To me, this prerequisite is a argument /pro/ having coreutils provide dos2unix/unix2dos (fromdos/todos, d2u/u2d, whatever). Also, I find myself sometimes converting whole directories full of DOS-like files, and a binary executable might be just a little more efficient here. My current script btw. also handles possible multiple consecutive DOS newlines.
Wow, that was a TERRIBLE example! ;-) I've used dos2unix enough to be annoyed by its lack of pervasiveness, but I don't know that I've *ever* used dirname (maybe 'basename', and only in scripts). To use your argument, dirname (and basename) is a simple hack that can be written as a trivial bash substitution. :-) Does that mean dirname should not be in coreutils?
Also, I find myself sometimes converting whole directories full of DOS-files, and a binary executable might be just a little more efficient here. In short, I agree with Woehlke here. bjd _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils