dshaw21369
Programmer
- Jul 8, 2002
- 64
I'm Trying add an .edi extenion to the file that originally looks like this: i.gtp.030206065504
I would like it to look like this: i.gtp.030206065504.edi
When using this code Im getting the error: Cannot rename *gtp.* to *gtp.*edi:
This is my code:
OLDSUFFIX=
NEWSUFFIX=edi
for FILES in *gtp.*"$OLDSUFFIX"
do
NEWNAME=`echo "$FILES" | sed -e "s/${OLDSUFFIX}\$/$NEWSUFFIX/"`
mv "$FILES" "$NEWNAME"
done
Any Suggestions would be appreciated!!!!
I would like it to look like this: i.gtp.030206065504.edi
When using this code Im getting the error: Cannot rename *gtp.* to *gtp.*edi:
This is my code:
OLDSUFFIX=
NEWSUFFIX=edi
for FILES in *gtp.*"$OLDSUFFIX"
do
NEWNAME=`echo "$FILES" | sed -e "s/${OLDSUFFIX}\$/$NEWSUFFIX/"`
mv "$FILES" "$NEWNAME"
done
Any Suggestions would be appreciated!!!!