#!/bin/sh # stripm: remove ^M and ^Z from a normal file # -f file test doesn't differentiate between ascii # and binary files # Author: Fred Brunet for i in $* do if [ -f $i ] then echo "Processing $i" cp $i $i.tmp tr -d '\015\032' < $i.tmp > $i if [ $?=0 ]; then rm $i.tmp fi fi done echo "Done" # end stripm