Simple Rust crate to read pipes from stdin.
if let Some(pipe) = read_pipe::read_pipe() {
println!("User has piped \"{pipe}\" to the program.")
}
Input:
echo "Really interesting pipe" | cargo run
Output:
Some("Really interesting pipe")
Input:
cargo run
Output:
None