On Mon, May 09, 2005 at 12:34:08AM +0300, Giorgos Keramidas wrote: > No "tool" is needed, as long as you have FreebSD's shell, sed & grep: > > $ find . | while read fname ;do > if grep '^M' "${fname}" >/dev/null 2>&1 ;then > sed -i '' -e 's/^M//g' "${fname}" > fi > done
Wouldn't this also catch directories or special files with ^M in them? I'd add a "-type f" to find to avoid errors while trying to write to a directory: $ find . -type f | while read fname ;do if grep '^M' "${fname}" >/dev/null 2>&1 ;then sed -i '' -e 's/^M//g' "${fname}" fi done Regards, -cpghost. -- Cordula's Web. http://www.cordula.ws/ _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"