search

Home  >  Q&A  >  body text

vim - In the terminal, output the command result to the cut version (you can paste it directly)

find . -name example >> test.js

The above example is output to a file.

So what should I do if I export it to the cut version?

巴扎黑巴扎黑2774 days ago690

reply all(3)I'll reply

  • 仅有的幸福

    仅有的幸福2017-05-16 16:37:42

    The command to operate the clipboard on the mac command line is pbcopy. This command copies the contents of the standard input to the clipboard, so that you can paste it directly using command-v.

    find . -name test.js | pbcopy

    reply
    0
  • PHPz

    PHPz2017-05-16 16:37:42

    http://stackoverflow.com/ques...

    reply
    0
  • 给我你的怀抱

    给我你的怀抱2017-05-16 16:37:42

    There is no need to exit vim at all, just enter vim directly; then enter the command: r ![cmd] ->Insert the execution result of the command at the current position
    [cmd] is the command you want to enter ([] do not enter it , this is just for marking)

    reply
    0
  • Cancelreply