i have an if loop loop where i configure commands in router as
mode contains config or unconfig as values
if {[regexp -nocase {^config$} $mode]} {
set conf ""
} else {
set conf no
}
$router config "$conf primary command\n"
$router config "$conf secondary command\n"
when mode is set to config everthing is fine , primary command is configured first and then secondary command" but while unconfiguring i want secondary command to executed first and then only it allows me to remove primary command...so when $mode changes will i be able to swap the order of execution?