Execute a system command: Difference between revisions

no edit summary
No edit summary
Line 1,177:
local f = io.popen("ls") -- store the output in a "file"
print( f:read("*a") ) -- print out the "file"'s content</syntaxhighlight>
 
=={{header|M2000 Interpreter}}==
 
<syntaxhighlight lang="m2000 interpreter">
Locale 1033 // for the chr$(string) : converτ ANSI to UTF16LE
Dos "chdir "+quote$(dir$)+"&& dir /w > out.txt";
Wait 100
Print "Press Space or Mouse to see next page"
A$=chr$(eval$(buffer("out.txt")))
Report a$ // view text using proportional typing, and at pages, with 3/4height scroll
</syntaxhighlight>
 
 
 
=={{header|M4}}==
404

edits