> I've downloaded a couple of .xhtml files and they have ^M characters
> all through it. I tried the col -b < name > newname command on these
> files but when I do that it erases the whole document. Any ideas?


handy little shell script i found a while ago which does exactly what you're
after


#!/bin/sh
# rmc.sh
# remove ^M characters
#
# slee 021116
# http://freebsd.mu

if [ $# -eq 1 ]
then
tr -d '\015' < $1 > $1.tmp.$$
mv -f $1.tmp.$$ $1
else
echo "Usage: $0 filename"
fi


Just place within /usr/local/bin and do 'chmod +x /usr/local/bin/rmc.sh'
then just do 'rmc.sh file' as and when you need.

HTH

Simon

_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to