dos格式迭代转为unix

 

#!/bin/bash

function recurse_convert() {
    local path=$1
    if [ "$path" == "" ];then
        path="."
    fi
    for file in `ls $path`
    do
        if [ -d $path"/"$file ]
        then
            recurse_convert $path"/"$file
        else
            dos2unix $path"/"$file
        fi
    done
}

 

posted @ 2019-11-20 11:16  石斋  阅读(128)  评论(0编辑  收藏  举报