#!/bin/zsh # # For each argument file name: *Replace* the file with its # unix-oid tr-fixed replacement. (I.e., translate all the mac # line termination characters ('\r', '\015') with Unix-style # newline characters ('\n', '\012').) # # Leave the old one in NAME.mac~ i.e., kinda like an Emacs backup file. # echo Replace these files with their unix-oid tr replacements: echo " $@" # sleep 3 don't think I need this any more. for fn in "$@" ; do echo Fix $fn /bin/mv $fn $fn.mac tr '\015' '\012' < "$fn.mac" > "$fn" /bin/mv "$fn.mac" "$fn.mac~" done