I want to use part of the output of a command run from the command line in another xterm, or as part of a different command. For instance:
> grep error err
You may send output directly to the concerned xterm using xterm device no. Here is the command.
xyz$ls /home/ankit/documents/etc/x/y/z > /dev/pts/0
(or watever is the device name, You can get it using command 'w' for opened xterm)
Try it & hope this may solve your problem.