actually added stdin support to cat
This commit is contained in:
parent
5b47345bf5
commit
c030d6828c
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue