I am trying to set-up multiple incr's for each entry in a list. I thought that I could assign an integer to each list entry...
set list {
{/run 00}
{/run/shm 00}
{/boot 00}
}
and use the following code as part of a foreach loop to increment the value...
lset list 1 [expr {[lindex $list 1] + 1}]
What I am finding is that the value increments correctly but when the code executes a second and third time the value has reset to 00, so it never increases past 1 on each pass.
If I set up a basic increment for a standard variable as part of the code..
set counter 00
incr counter
it quite happily increments on each run of the code and the counter increases by 1 until I break the code.
Any advise or help in getting this working would be much appreciated. I am definitely not a tcl expert so if I am trying to accomplish this the wrong way please let me know. :)
Thanks in advance for your help.