I'm just learning to use process substitution in bash. Here's the command:
echo TEXT > >(tee log)
This is a pointless command but the thing is I have to press Enter after I run it. Why is that?
Sometimes this happens with more useful commands like:
ls SOME_NON_EXISTING_FILE 2> >(tee log)
Actually Enter is not really needed, you can just enter next command e.g. date and check. What is happening that because of process substitution your command exits first and then output gets written on your terminal, that is the reason you get false impression of need to press an Enter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With