Index: mttroot/mtt/bin/mtt_rename ================================================================== --- mttroot/mtt/bin/mtt_rename +++ mttroot/mtt/bin/mtt_rename @@ -12,10 +12,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.5 2000/12/27 13:11:42 peterg +## *** empty log message *** +## ## Revision 1.4 1998/08/15 13:50:22 peterg ## Doesn't zap preexisting files ## ## Revision 1.3 1998/08/14 15:37:38 peterg ## rename now copies - no delete @@ -30,17 +33,19 @@ old_name=$1 new_name=$2 extension=$3 -left='[^a-zA-z]' +left='[^a-zA-Z]*' right=$left if [ -f "$new_name$extension" ]; then - echo "$new_name$extension \t already exists -- no action taken" + echo "$new_name$extension already exists -- no action taken" exit fi if ls $old_name$extension > /dev/null 2>&1 then echo Renaming $old_name$extension to $new_name$extension sed "s/\($left\)$old_name\($right\)/\1$new_name\2/g" <$old_name$extension >$new_name$extension fi + +