#!/bin/bash
# change file extension
# example, change all txt files to .log cfe txt log
ARGS=2
E_BADARGS=65
if [ $# -ne $ARGS ]
then
echo "Usage: `basename $0` old_file_suffix new_file_suffix"
exit $E_BADARGS
fi
for filename in *.$1
do
mv $filename ${filename%$1}$2
done