rush/example.rsh

22 lines
437 B
Plaintext
Executable File

#!/bin/rush
let x = %cat example.rsh%;
if x.contains("example") {
%echo It\\'s a script!%
}
if %echo some words%.contains("me wo") {
println!("But it's also Rust!");
}
let mem = %free -h%.lines().nth(1).unwrap()
.split_whitespace().nth(3).unwrap().to_owned();
// for i in 0..10000 {
// println!("x contains %% example? [{}]", x.contains("example"));
// }
println!("There are {} of memory free", &mem);
%echo hello%