prompt(1) in rust
This commit is contained in:
parent
ba05e57b72
commit
db840af366
9
echo/prompt.rs
Normal file
9
echo/prompt.rs
Normal file
@ -0,0 +1,9 @@
|
||||
use std::env::args;
|
||||
|
||||
fn main() { // cannot do non UTF-8 strings as far as I know
|
||||
if args().collect::<Vec<String>>().len() >= 2 {
|
||||
for argument in args().skip(1) {
|
||||
print!("{} ", argument);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user