smu johnson wrote: > Hi, > > I hope this is the right place to ask this. I think a very handy argument > to add to the list of aliases for character classes in tr would be a new one > that behaves like [:cntrl:], except that it will not include newline > characters in that class. > > The reason is at work here I deal with XML data that people send us that has > all sorts of strange characters in it, like ^@, ^Z, etc etc... and I'd like > to use tr to quickly trip all this garbage out of there without it > destroying the newline characters too...
This is not supported at present, but you may be able to get what you want with: tr -c '[:print:]\n' . Your suggestion has some merit though. I've previously needed to do something similar: http://code.google.com/p/fslint/source/browse/trunk/fslint-gui#122 Pádraig. _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
