yac
/
coreutils
Archived
2
0
Fork 0

actually added stdin support to cat

This commit is contained in:
Emma Tebibyte 2022-12-05 21:03:42 -05:00
parent 5b47345bf5
commit c030d6828c
1 changed files with 25 additions and 25 deletions

View File

@ -25,6 +25,8 @@ fn main() {
// delay as each is read. // delay as each is read.
"-u" => {}, "-u" => {},
"-" => {},
_ => { _ => {
println!("Usage: {} [options...] [files...]", argv0); println!("Usage: {} [options...] [files...]", argv0);
process::exit(64); // sysexits(3) EX_USAGE process::exit(64); // sysexits(3) EX_USAGE
@ -32,7 +34,6 @@ fn main() {
}; };
} }
} }
else {
for path in args { for path in args {
let mut val = String::new(); let mut val = String::new();
@ -60,7 +61,6 @@ fn main() {
} }
print!("{}", val); print!("{}", val);
} }
}
io::stdout().flush().unwrap(); io::stdout().flush().unwrap();
} }