(correct me if the title is not so stated)
How to handle stdin for all strings in Rust on * nix?
Examples:
~$ cat file | rust_cmd # и что то делаем дальше ~$ rust_cmd < file ~$ xargs -I% rust_cmd % < file The code from the documentation returns only the first line.
use std::io; fn main() -> io::Result<()> { let mut input = String::new(); io::stdin().read_line(&mut input)?; println!("You typed: {}", input.trim()); Ok(()) } While he began to read in this direction, please indicate the part in the documentation where it is described.