Jason Van Cleve wrote: > Actually, the DOS newlines themselves were not my problem, and I didn't > <i>want</i> to change them necessarily. It was that they were confusing > sed so that my regular expression didn't work. To my simple mind, DOS > newlines are newlines too, and so "$" should match them. Unless it is > unreasonable to expect sed to account for that when pattern matching, > then it would seem sed could do its one thing that much better.
If you want to strip whitespace and preserve DOS line endings, try this. $ sed -e 's/[ ^I]+\(^M?\)$/\1/' (^I and ^M are TAB and CR characters, octal 011 and 015.) -- Bob Miller K<bob> kbobsoft software consulting http://kbobsoft.com [EMAIL PROTECTED] _______________________________________________ EUGLUG mailing list [email protected] http://www.euglug.org/mailman/listinfo/euglug
