#!/bin/csh
# mvfiles
# Renames C++ sources to a different extension.

if ( $1 == "" ) then
  echo "Usage: mvfiles new_ext files"
  exit
endif

if ( $2 == "" ) then
  echo "Usage: mvfiles new_ext files"
  exit
endif

setenv NEWEXT $1
shift

foreach file ($*)
# if ( -e $file ) then
  echo "Renaming "$file"..."
  mv $file ${file:r}.${NEWEXT}
# endif
end

exit