26 lines
584 B
Plaintext
Executable File
26 lines
584 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();
|
|
|
|
let (_stdout, _stderr) = %^curl bob%;
|
|
println!("Collect stdout and stderr separately!");
|
|
|
|
// for i in 0..10000 {
|
|
// println!("x contains %% example? [{}]", x.contains("example"));
|
|
// }
|
|
|
|
%echo Double-up your percent signs to display them literally 100%%!%
|
|
|
|
println!("There are {} of memory free", &mem);
|