Why I need to type press Enter key to finish this command?

Faj*_*iya 4 bash io-redirection process-substitution stdin

I'm a new Linux user and I was doing some experiments and trying to understand Process Substitution. I believe I already have a basic understanding of it. But here is a case that I don't know why. I'm using Bash on Ubuntu 20.04.

echo hi just sends the string hi with a newline character to stdout.

root@u2004:~# echo hi | od -a
0000000   h   i  nl
0000003
root@u2004:~#
Run Code Online (Sandbox Code Playgroud)

cat can read from the pipeline as its stdin, and send what it read down to the pipeline.

root@u2004:~# echo hi | cat
hi
root@u2004:~# echo hi | cat | od -a
0000000   h   i  nl
0000003
root@u2004:~#
Run Code Online (Sandbox Code Playgroud)

As I understand, the command echo hi > >(cat) will also make cat read from its stdin (and print to the console). But when I run it, I got this:

root@u2004:~# echo hi > >(cat)
root@u2004:~# hi
<the cursor blinks at this location>
Run Code Online (Sandbox Code Playgroud)

I have to press the Enter key to finish the command.

root@u2004:~# echo hi > >(cat)
root@u2004:~# hi
Enter
root@u2004:~#

Why this behavior? Is my understanding of the command echo hi > >(cat) correct?

gle*_*man 6

Nothing is wrong, the command completed successfully.

What you saw:

root@u2004:~# echo hi > >(cat)
root@u2004:~# hi
<the cursor blinks at this location>
Run Code Online (Sandbox Code Playgroud)

You entered the command, hit Enter. Your shell printed out your prompt, and then the cat process, launched asynchronously, completes and spits out hi\n.

The cursor blinking on the blank line belongs to the prompt on the previous line, but the newline from the echo command has disrupted your display.

The subsequent "hitting enter" just gives you a new prompt. If you enter a command and hit enter, that command will run.