I know how to read the command line arguments, but I am having difficulties reading the command output from a pipe.
Connect a program (A) that outputs data to my Rust program using a pipe:
A | R
The program should consume the data line by line as they come.
$ pwd | cargo run
should print thepwd
output.OR
$ find . | cargo run
should output thefind
command output which is more than 1 line.