process: Move files to their own directory

This commit is contained in:
Ivan Petkov
2019-06-24 17:31:47 -07:00
parent b7846a4e2f
commit c6defbce4b
16 changed files with 0 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
// A cat-like utility that can be used as a subprocess to test I/O
// stream communication.
use std::io;
use std::io::Write;
fn main() {
let stdin = io::stdin();
let mut stdout = io::stdout();
let mut line = String::new();
loop {
line.clear();
stdin.read_line(&mut line).unwrap();
if line.is_empty() {
break;
}
stdout.write_all(line.as_bytes()).unwrap();
}
stdout.flush().unwrap();
}
+5
View File
@@ -0,0 +1,5 @@
#[allow(dead_code)]
fn main() {
std::process::exit(std::env::args().nth(1).unwrap().parse().unwrap());
}