I want to open three terminals and I want to write a command in the first window that will send a Hello message to the other two. The command must allow a one-time sending without a response from the other terminals.
I used:
tee > /dev/pts/1 /dev/pts/2
and everything is good, but I want to exit the command after typing Hello without using Ctrl+d
Ctrl+C? It's unclear what the issue is with marking end-of-input withCtrl+Dand it's unclear what you would like to do otherwise.read val; echo "$val" | tee /dev/pts/1 /dev/pts/2perhaps? (or shorterread val; echo "$val" | tee /dev/pts/{1,3})head -1 | tee /dev/pts/{1,3}echo Hello | tee …