#!/bin/bash
for f in $*
do
dir=`dirname $f`
mkdir -p $dir/sv
if [ ! -d $dir/sv ]
then
echo "cannot backup to $dir/sv"
exit 1
fi
cp $f $dir/sv
cat $f | tr -d '^M' > $f.sv
mv $f.sv $f
chmod 755 $f
done