#!/bin/bash # Change Extensions for all files #source `which ttPM-funcs` 2>/dev/null || exit 1 if [ $# -ne 2 ] then echo "Usage: `basename $0` old_file_suffix new_file_suffix" exit 1 fi # Traverse list of files ending with 1st argument. for F in *.$1 do # Strip off part of filename matching 1st argument, # then append 2nd argument. mv $F ${F%$1}$2 done exit 0