what's an equivalent for the following Perl one-liner?

Mikhail Teterin mi+mx at aldan.algebra.com
Thu Dec 22 09:32:43 PST 2005


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


More information about the freebsd-questions mailing list