Task

Run either the   ls   system command   (dir   on Windows),   or the   pause   system command.




Related task
  Get system command output


use std::process::Command;
fn main() {
    let output = Command::new("ls").output().unwrap_or_else(|e| {
        panic!("failed to execute process: {}", e)
    });
    println!("{}", String::from_utf8_lossy(&output.stdout));
}
 