Removing special characters - Control M

I have developed a small script to remove the Control M characters that get embedded when we move any file from Windows to Unix. For some reason, its not working in all scenarios. Some times I still see the ^M not being removed. Is there anything missing in the script:

cd ${inputDir}
lCountFixed=0
lCountAll=$(find . | wc -l)
doclist=$(find .)
for v in $doclist
do 
        echo "\n Scan file:"$v
        lc=$(od -t x1 $v | grep '0d 0a' | wc -l)        
        if [ $lc -ne 0 ];
        then
                lCountFixed=`expr ${lCountFixed} + 1`
                docname=${v}
                cat ${docname} | col -b > tep
                mv tep ${docname}
                chmod 755 ${docname}
                echo "    Fixed file:"$v
        fi
done

Any inputs please why the 'col -b' does not work all times?

Why reinvent the wheel? Try

dos2unix filename

do2unix also did not work sometimes. So, we had to write a custom script.

#!/bin/bash

if [[ -z "$1" ]]; then
   echo "Usage: ${0##*/} filename-to-convert"
   exit 1
fi

newfile=$1.linux
CR='\015'
tr -d $CR < $1 > $newfile
echo "Original DOS text file is \"$1\"."
echo "Converted Linux text file is \"$newfile\"."
tr -d '\r' < file

thank you all for your inputs

For in-place editing:

sed -i 's/<CTRL+V+M>//g' inputfile

@vskr72
The reason your script was intermittent is because the od -t x1 output is formatted into multiple lines and your grep '0d 0a' would only find the two characters if they were on the same formatted line.

When moving files from Windows to unix, use ASCII mode ftp or sftp if possible because this does the conversion for you.