Game Development Community

Ctrl-m characters

by Benoit Touchette · in RTS Starter Kit · 11/26/2004 (6:15 pm) · 1 replies

Finally got around to installing the new Linux installer and noticed that those pesky ctrl-m characters are still showing up in my favorite editor (mcedit). Here is a little script to take care of those characters (needs to be run top level in the source tree):

#! /bin/sh

find -name "*.cs" -exec dos2unix -U '{}' \;
find -name "*.c" -exec dos2unix -U '{}' \;
find -name "*.cc" -exec dos2unix -U '{}' \;
find -name "*.cpp" -exec dos2unix -U '{}' \;
find -name "*.h" -exec dos2unix -U '{}' \;
find -name "*.mk" -exec dos2unix -U '{}' \;
find -name "Mak*" -exec dos2unix -U '{}' \;
find -name "*.txt" -exec dos2unix -U '{}' \;
find -name "*.asm" -exec dos2unix -U '{}' \;
find -name "*.inl" -exec dos2unix -U '{}' \;
find -name "*.htm*" -exec dos2unix -U '{}' \;
find -name "*.gui" -exec dos2unix -U '{}' \;
find -name "*.cfg" -exec dos2unix -U '{}' \;

#1
11/26/2004 (6:25 pm)
GAH! those ' should be the single quote character.