Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use std::process::Command;
- fn main() {
- let output1 = Command::new("echo")
- .arg("ls")
- .output()
- .expect("dupa");
- let ls = String::from_utf8_lossy(&output1.stdout).to_string();
- print!("elo: {}", ls);
- let output2 = Command::new(ls)
- .output()
- .expect("dupa");
- print!("{}", String::from_utf8_lossy(&output2.stdout).to_string())
- }
Add Comment
Please, Sign In to add comment