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
I find XSel is useful in similar situations. It's a tool that manipulates the X selection. For example, this will store the output of your command to the clipboard:
grep error error.log | xsel -bi