News for hackers. Stuff that matters.
Re:Show HN: Using Rust to write shell-script like tasks by jabirali on Sunday August 23, 2020 @07:49AM (#24251238)
Do you mean that you want `cmd2 <(cmd1)` as a synonym for `cmd1 | cmd2`? In that case, I’m happy it doesn’t; it drastically lowers readability compared to left-to-right command pipelines, and I don’t see what value it adds.
Re:Show HN: Using Rust to write shell-script like tasks by viraptor on Sunday August 23, 2020 @07:55AM (#24251262)
Not quite. "<(cmd1)" creates a pipe, connects cmd1 output to it and replaces the expression the pipe name. With one argument you can often use "cmd1 | cmd2 /dev/stdin", but with two you need something better.

Think "diff <(something) <(other)" without using temporary files.

Re:Show HN: Using Rust to write shell-script like tasks by rustshellscript on Sunday August 23, 2020 @08:40AM (#24251481)
Yes, I also use this for automatically capturing command error messages with timestamps into logs: https://github.com/rust-shell-script/bash_cmd_lib/blob/0b0a6...

However this can be fragile in bash script since any sub shell command can fail. I am still wandering how to support it in this rust_cmd_lib library.