3 # Remove all those annoying ^M characters that Winblows editor's like to add
4 # from all files in the current directory and all subdirectories.
6 # Written by: Jonathan Haase.
8 # UPDATE: 7/31/2001: fix so that it doesn't touch things in the images directory
10 # UPDATE: 12/15/2003: Fix so that it doesn't touch any "non-text" files
14 grep -sv FILELIST FILELIST.$$ > FILELIST2.$$
15 grep -sv $(basename $0) FILELIST2.$$ > FILELIST.$$
16 grep -sv "^\.$" FILELIST.$$ > FILELIST2.$$
17 file -f FILELIST2.$$ |grep text | sed -e 's/^\([^\:]*\)\:.*$/\1/' > FILELIST
18 file -f FILELIST2.$$ |grep -sv text | sed -e 's/^\([^\:]*\)\:.*$/Not Modifying file: \1/'
22 for i in $(cat FILELIST); do
24 sed -e s/
\r//g $i > $i.tmp