#!/bin/sh TMPFILE=foo42 if [ -f $TMPFILE ] ; then echo Weird...the temp file $TMPFILE already exists. Get rid of it. exit 0 fi while [ $# -ne 0 ] ; do tr -d '\015' < $1 > $TMPFILE if [ $? -eq 0 ] ; then mv $TMPFILE $1 echo Successfully translated $1 from a DOS text file. fi shift done rm -f $TMPFILE