Crates.io | scriptkit |
lib.rs | scriptkit |
version | 1.0.1 |
source | src |
created_at | 2022-12-19 21:59:07.161204 |
updated_at | 2023-01-06 23:52:55.929141 |
description | A simple scripting Tool Kit for Rust |
homepage | |
repository | |
max_upload_size | |
id | 741717 |
size | 4,904 |
A simple toolkit for shell scripting in Rust!
use scriptkit::shell::{Cmd, Arg, shell_tools::null_sh};
#[allow(unused_imports)]
use scriptkit::sys::{OS, os_eye::open};
fn print_host() {
println!("Executed On: {:?}", open().name);
}
fn main() {
// Construct your command!
let cmd = Cmd::new("echo");
// Construct your argument!
let arg = Arg::new("Hello, World!");
// Execute the command!
null_sh(cmd, arg).expect("Failed to run command");
print_host();
}