Anonymous user
Execute a system command: Difference between revisions
m
→{{header|Ruby}}: read from command through a pipe
m (→{{header|Ruby}}: read from command through a pipe) |
|||
Line 504:
exec "ls"
# replace current process with another
# call system command and read output asynchronously
io = IO.popen('ls')
# ... later
io.each {|line| puts line}</lang>
=={{header|Slate}}==
|