I'd like a sed string, that will remove both the carriage returns and the blanks at eol in one go. Perl appears to recognize the \r character and DTRT: perl -p -e 's,[ \r]+$,,' < in > out What's the sed's equivalent? Thanks! -mi