Macro cmd_lib::run_fun[][src]

run_fun!() { /* proc-macro */ }
Expand description

Run commands, returning result handle to capture output and to check status

let version = run_fun!(rustc --version)?;
println!("Your rust version is {}", version);

// with pipes
let n = run_fun!(echo "the quick brown fox jumped over the lazy dog" | wc -w)?;
println!("There are {} words in above sentence", n);