#!/bin/sh # converts from dos to unix files # # by /kc if [ "$1" = "-h" ] || [ "$1" = "" ]; then echo "usage: `basename $0` {files}" echo " This will replace {files} with the converted dos -> unix fil es." else for i in $*; do if [ -f $i ]; then tr -d "\r" < $i > /tmp/cr2lf.$$ cat /tmp/cr2lf.$$ > $i # retains permissions. rm /tmp/cr2lf.$$ else echo $0": " $i "does not exist." >&2 fi done fi