cmd_lib 0.11.6

Common rust commandline macros and utils, to write shell script like tasks easily
Documentation
1
2
3
4
5
6
7
8
9
10
11
use cmd_lib::{run_cmd, run_fun, CmdResult};

fn main() -> CmdResult {
    cmd_lib::set_debug(true);
    if run_cmd!(false | wc).is_err() {
        eprintln!("running pipe failed");
    }
    let _result = run_fun!(du -ah . | sort -hr | head -n 5)?;
    run_cmd!(echo xx | false | wc | wc | wc)?;
    Ok(())
}