#!/bin/ksh #Script to remove the ugly DOS ^M characters for readfiles in $@ do tr -d 'r' < $readfiles > $sometempfile.tmp mv $sometempfile.tmp $readfiles done
This script removes the ^M character from the file. Mainly for those who use windows editor to edit Unix/Linux text files. I would definitely recommend VI or emacs if you are messing with Unix/Linux text files. Create a shell script file and copy paste the code below.