Skip to navigation
Call shell command with rust
27.08.25
``` use std::process::Command; fn main() { let output = Command::new("echo") .arg("Hello world") .output() .expect("Failed to execute command"); assert_eq!(b"Hello world\n", output.stdout.as_slice()); } ```
https://doc.rust-lang.org/std/process/struct.Command.html
Reply
Anonymous
Information Epoch 1764946679
When in doubt, use brute force.
Home
Notebook
Contact us