The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-28-2007
steiner steiner is offline
Registered User
  
 

Join Date: Jul 2003
Location: Hambach - France
Posts: 29
Automatic name file with increase

Hello,

A file named c15a is registered on my disc all 10 minutes.

I must rename that file with the actually Date and with an automatic increase number on 5 digits, so as : c15a.20070528.00001 and the next file will be : c15a.20070528.00002.

The next day so tomorrow the five digits must be reset to 00001 so as for tomorrow : c15a.20070529.00001.

I have done the script with the rename with the date but i have a problem with the automatic increase number.

So can you help me with that increasing five digits number and automatic reset when the day changed.

So thanks a lot , bye.