Summary
We've had a taste today of the powerful things that can be done when your scripts control the environment around them. Here's a brief recap.
The hash-like ENV object and the methods of File, Dir, and Find all provide a script with information about the situation within which it operates. Ruby scripts can run external programs either sequentially, optionally capturing their output for later use, or in parallel; they can also split themselves into separate processes. Processes running at the same time can communicate through IO objects called pipes, which are either created implicitly by IO.popen or explicitly by IO.pipe. Parent processes can and should keep track of what their children are doing. They can communicate with children not ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access