Function libaki_stats::execute [−][src]
pub fn execute(sioe: &RunnelIoe, prog_name: &str, args: &[&str]) -> Result<()>
Expand description
execute stats
params:
- sioe: stream in/out/err
- program: program name. etc. “stats”
- args: parameter arguments.
return:
- ok: ()
- err: anyhow
Examples
Example 1: the all statistics
Output the all statistics of input text.
use runnel::RunnelIoeBuilder;
let r = libaki_stats::execute(&RunnelIoeBuilder::new().build(),
"stats", &["-a"]);
Example 2: the line count
Output the only line count.
use runnel::RunnelIoeBuilder;
let r = libaki_stats::execute(&RunnelIoeBuilder::new().build(),
"stats", &["-l"]);