How can I let the pipe work only when there's output in first command? I'm looking for a workaround for pick
.
I've tried find|xargs -r pick
, but pick
only receives input from pipe.
Thanks in advance!
How can I let the pipe work only when there's output in first command? I'm looking for a workaround for pick
.
I've tried find|xargs -r pick
, but pick
only receives input from pipe.
Thanks in advance!
...|{ read -n1 p; [ -z "$p" ]||pick; }
– Rashedul Hasan Rafi Dec 02 '23 at 11:58