hi all,
i'm part way through building a script to process some files but i'm having an issue with the following.
so i'm finding the files in a directory by searching for a specific string in the file name.
what i need to do is after if finishes running through the script i need to then ammend the variable from 01 to 02 then 03 and so on so that next time it runs it picks up the next file in sequence.
so i'm using the following at the moment
Code:
sed -i "s/FILE=$FILE/FILE=$ADD/" temp.sh
where ADD is doing the following
Code:
ADD=$(expr $EP + 1)
the FILE variable at the start is just FILE=01
now this is working for me but the output is coming out with 1 instead of 01.
does anyone know how i can get it to add the 0 at the end upto 09?
or if there is a better way to action this?