Example process waiting an input sent to background
$ read -p "Input text and hit ENTER to exit" &
I try to write to stdin (fd/0) with \n
$ echo -e "ok\n" > /proc/$!/fd/0
$ fg read -p "Please hit ENTER"
so the process is still running, then string "ok\n" never reach it
How can I send a string+ENTER to another process STDIN?