Shell Script for file naming

Hi All,

I am looking for a Unix shell script for file naming such that the file names itself as KARAN0001.

[LEFT]The 4 digit sequence number must start at 0001 and end at 9999.
After 9999 is reached, the number must reset to 0001.[/LEFT]

Can anyone please help me with that.

Thanks & Regards

Karan

You can start from here:

#/bin/bash
for i in {1..9999}
do 
     printf "%s%.4d\n" "KARAN" $i
done

Can you post the script that produces the files within code tags (select the code and click on the # above the edit window)?

Regards