Something
public text v1 · immutableset i [ lsearch $auto_path /usr/lib ]
set j [ lsearch $auto_path /usr/lib64 ]
puts stderr "old auto_path: $auto_path"
puts stderr "i: $i j: $j"
if {$i >= 0 && $j >= 0 && $i < $j} {
set auto_path [lreplace $auto_path $i $i /usr/lib64 ]
set auto_path [lreplace $auto_path $j $j /usr/lib ]
}
puts stderr "new auto_path: $auto_path"