subprocess 0.2.9

Execution of child processes and pipelines, inspired by Python's subprocess module, with Rust-specific extensions.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
extern crate subprocess;

use std::io::{BufRead, BufReader};
use subprocess::Exec;

fn main() {
    let x = Exec::cmd("ls").stream_stdout().unwrap();
    let br = BufReader::new(x);
    for (i, line) in br.lines().enumerate() {
        println!("{}: {}", i, line.unwrap());
    }
}