[−][src]Macro cmd_lib::run_cmd
run_cmd! --> CmdResult
#[macro_use] use cmd_lib::run_cmd; let name = "rust"; run_cmd!(echo $name); run_cmd!(|name| echo "hello, $name"); // pipe commands are also supported run_cmd!(du -ah . | sort -hr | head -n 10); // or a group of commands // if any command fails, just return Err(...) let file = "/tmp/f"; run_cmd!{ date; ls -l $file; };