Currently, I am using the following command to change dos2unix line endings, but this is for file-y file...
sed -i \'s/\\r//\' filename
Is ther
for i in `find . -type f \( -name "*.c" -o -name "*.h" \)`; do sed -i 's/\r//' $i ; done