My code is as below
set devicelist ""
set readdevice [open "device.txt" r]
while {[gets $readdevice linenew] != -1} {
lappend devicelist $linenew
}
puts $devicelist
and the result is
device1 device2 device3 { device4 } { device5 } { device5 }
Question 1
why my result sometime with curly bracket and sometime is not with the curly bracket?
Please advice
set devicelist ""
set readdevice [open "device.txt" r]
while {[gets $readdevice linenew] != -1} {
lappend devicelist $linenew
}
puts $devicelist
and the result is
device1 device2 device3 { device4 } { device5 } { device5 }
Question 1
why my result sometime with curly bracket and sometime is not with the curly bracket?
Please advice