Hi all,

After processing files in my perl script, I need to move them to the final
destination.  My problem is if the file already exists (lets call it
data.txt), I need to rename it to data-v01.txt (where -v01 is version 01).

So... if there are four other esisting versions, data-v03.txt should become
data-v04.txt, then data-v02.txt should become data-v03.txt, then
data-v01.txt should become data-v02.txt, data.txt should become
data-v01.txt, finally data.txt can be written.

I have to keep all versions of the existing files and oldest must have the
highest -v## (version number) and newest is just data.txt.  I will end up
with 20 or more versions of each file.

Is this a job better done in bash or perl?  Either way, any pointers would
be greatly appreciated!

Thanx!



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to