Execute a system command: Difference between revisions
Content added Content deleted
m (→{{header|APL}}) |
No edit summary |
||
Line 1,177: | Line 1,177: | ||
local f = io.popen("ls") -- store the output in a "file" |
local f = io.popen("ls") -- store the output in a "file" |
||
print( f:read("*a") ) -- print out the "file"'s content</syntaxhighlight> |
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}}== |
=={{header|M4}}== |