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 error.log
error: can't find file ~/<some very long path>/thisfile
and I want to do this:
>ls ~/<some very long path>/
I know two ways to do this:
1. copy ~/<some very long path>/
with the mouse.
2. use some combination of head
/tail
/awk
/sed
/perl
/cut
/etc... to extract only what I need from the output and then use that inside backticks.
Is there any way to copy text without using the mouse? The example that comes to mind is visual mode inside VIM, but I don't know how to do that inside the xterm.