I´m pretty new in TCL. I made a script with the following code:
if {[file exists /proc/cpuinfo]} {
exec grep "model name" /proc/cpuinfo
exec grep "cpu MHz" /proc/cpuinfo
}
puts "Hostname : [info hostname]"
For some reason, the exec command is not executed. Even if I take out the brackets, the command is not working. Besides, if I execute command by command in tclsh, it works correctly.
tclsh
%exec grep "model name" /proc/cpuinfo
model name :Intel(R) Xeon(R) CPU @2.53GHz
%exec grep "cpu MHz" /proc/cpuinfo
cpu MHz :2533.423
execreturns... - Shawn