#! /bin/bash
# Programe:
# To change the the file with end of \r\n, into linux style with end of \n
# History:
# 2012/11/12 ZL FirstRelease
# function:
# To ergodic the diretory
function ergodic(){
for file in ` ls $1 `
do
if [ -d $1"/"$file ]
then
ergodic $1"/"$file
else
file="$1"/"$file"
func $file;
echo "$file";
read -p "dd" X
fi
done
}
# Function:
# To make the file with end of \r\n into \n
function func () {
tmp=".tmp";
echo > .tmp
sed 's/\r$//g' $1 >> .tmp # \r\n