In Ruby / PERL, I can very easily get the console output of a system command filed. For instance:
$k = `ls`
Will inject ls output into the $ k variable in PERL (and Ruby).How can I do something like this in Tcl?Thanks
Use the exec command to get the same thing.
exec
set output [ exec ls ] puts $output
Man page: exec
Source: https://habr.com/ru/post/1210485/More articles:jQuery image Grid System - javascriptHow to prevent excel from truncating numbers in a CSV file? - excelRobolectric RoboAttributeSet is never read - androidinstalling EGit under Eclipse Luna (4.4.1) - eclipsehow to horizontally center multiple divs in parent div - javascriptPython: how to stop a function? - functionForcing a column of lists into a row in a data frame R - rResharper 9 File Layout: determining the sort order when sorting by access modifier is not possible? - c #Jpeg files to download dlib - c ++Matplotlib TypeError when importing matplotlib.pyplot - stdstringAll Articles