In Ruby/PERL, I can very easily get the console output of a system command fed into a file. For example:
$k = `ls`
Would input the output of ls into variable $k in PERL (and Ruby). How can one do something like this in Tcl? Thanks
Use exec command to get the same.
exec
set output [ exec ls ] puts $output
Man page : exec