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 can use GNU screen's copy and paste commands.
Quick tutorial:
screen
(or screen myprog my args here
)Screen is much more powerful than that (I use it to tab several virtual terminals without the need for a special terminal emulator, and also so that I don't loose my sessions when X crashes or something). To get out of screen, simply end your shell session, or type Ctrl+a, Ctrl+\.