Executing a command in another existing terminal can be done, but it is far from trivial.
First, you have more than one terminal emulator open. Those terminal emulators are running a shell, probably
bash if you're on Linux. With the
ps command you can find the process ids (PID) of all the shells running on your machine. The big question now is; which one to send the command to?
You are looking for a shell that belongs to the terminal wou want to show the command on. Running the command
echo $$ on the terminal in question should return the PID of the shell running on that terminal.
/proc filesystem you can determine the shell's standard input
/proc/<PID>/fd/0, which is a
Next you want to send a command to that terminal. This has to be done using the
ioctl command on the shell's pty. You can find the C source code to do that here. Compile that program as e.g.
ttyecho and put it in a directory in your $PATH.
Now the pieces are in place, and you could call the
ttyecho command with the name of the shell's pty, and the command
Doing all this in vimscript is left as an exercise for the reader. :-)