#!/bin/sh #This is Carriage Return delete #INPUT: DOS/WIN .txt Format, OUTPUT: UN*X Textformat #(not really tested, so be careful!) tmp="/tmp/$RANDOM$RANDOM" for file do echo "Processing: $file" cat $file | tr -d '\r' > $tmp test -x $file && chmod ugo+x $tmp mv $file $file.bak mv $tmp $file done