subprocess 0.1.8

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 subprocess::{Exec};
use std::io::{BufReader, BufRead};

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());
    }
}