How do I copy text from my xterm without a mouse?

后端 未结 6 1562
夕颜
夕颜 2021-01-30 05:27

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         


        
6条回答
  •  深忆病人
    2021-01-30 06:10

    The OP said he didn't want to do this, but here is a unix utils way to do it for posterity. If you learn these little unix utilities they can be quite powerful.

    ls $( dirname $( grep error error.log | head -1 | cut -d " " -f 5- ) )

    note: syntax from memory

提交回复
热议问题