### # nocr: remove RETURNs from file # author: Keven Miller 01/19/2011 # for f in $* do # get file extension e=$(echo $f | sed -e "s/.*\(\.[^\.]*$\)/\1/") # get filename only n=$(basename $f $e) mv $f $n.old # remove ALL CR from file cat $n.old | tr -d "\015" >$f echo "$f ==> $n.old" done ###