It is possible and how to execute external shell command? Like ifconfig for example or uptime.
Can anyone give me an example of how to run something in shell and grab the output and print it in channel.
either with
set mydata [exec ls]
foreach x $mydata {
#do something with $x
}
or with
set fs [open |ls]
while {![eof $fs]} {
gets $fs data
#do something with $data
}
close $fs