Parsing FileNames

Hi,

Its been a long time since I've done any shell scripting and I need some help here. Thanks in advance...

I need this as a bourne or csh script running under SCO.

In a folder I have a list of Backup files named with "TarBackup plus a date and time component suffix" like this;

TarBackup201401010512  <-- keeper
TarBackup201401020512
TarBackup201401200512
TarBackup201401210512
TarBackup201401220512
TarBackup201401230512
TarBackup201402010512  <-- keeper
TarBackup201402120512

I want to move all the keepers, (1st day of each month) into the \keepers folder. So here I need to test the 16 and 17 characters for "01" and move only those files, while deleting the rest.

As you can see this is for automated backups management.

Thanks
Stanley

Try:

mv TarBackup??????01* /keepers

Bartus11,

I sure didn't see that coming... I was making it way to complicated, when it's so simple.

Thanks so much!
Stanley