--------------------- Cut here ------------------------
#!/bin/sh
# Script written by Cristan Szmajda 

if [ $# -eq 0 ]; then
        echo "Usage: undos "
fi

for file
do
tr -d '\015' <$file >/tmp/.undos.$$
mv /tmp/.undos.$$ $file
done
--------------------- Cut here ------------------------

Usage

Usage: undos <filename>

This script is useful where there are no dos2unix tools available.

1