11: Scripts
EMG™ Edge Management Gateway User Guide
234
}
if {[string first ">" $line] != -1} {
set loggedIn true
}
}
if {! $loggedIn} {
exit 1
}
puts $io "show temp"
flush $io
set gotTemp false
while {! $gotTemp} {
set len [gets $io line]
if {[string first "Current Internal Temperature" $line] != -1} {
set emgTemp [string range $line [expr {[string first ":" $line] +
1}] end]
set gotTemp true
}
}
puts "Temperature: $emgTemp"
puts $io "logout"
flush $io
exit 0