echo 'from pipe'|(cat <<< 'from input redirect')
from input redirect
What happens to the line 'from pipe' coming from echo?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
It will be sitting unused in an output buffer and discarded when both commands have exited.
If the left hand side produces enough data to fill the output buffer, it will temporarily pause until the buffer has been consumed. Since this won't happen here, it would eventually get a
SIGPIPE signal and die from a "broken pipe" as soon as the right hand side command terminated. It may also catch the
SIGPIPE signal specifically and exit gracefully.