#!/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 }