Convert Dos file to Unix file on MAC
1. To make /usr/bin/dos2unix excutable file as below:
#/usr/bin/sh
perl -pi -e 's/\r/\n/g' $*
2. make it excutable
$> chmod +rx /usr/bin/dos2unix
3. To type following script:
$> find . -name "*" -type f -exec dos2unix {} \;
#/usr/bin/sh
perl -pi -e 's/\r/\n/g' $*
2. make it excutable
$> chmod +rx /usr/bin/dos2unix
3. To type following script:
$> find . -name "*" -type f -exec dos2unix {} \;
Comments