Copy a string to clipboard from Mac OS command line

前端 未结 2 1734
灰色年华
灰色年华 2021-02-13 14:43

is there a way to copy a string to clipboard from command line?

To be more specific, I want to make a script which copies my email address to clipboard, so that when I n

2条回答
  •  孤城傲影
    2021-02-13 15:15

    You need to pipe the output of your script to pbcopy

    For example:

    ./somescript.sh | pbcopy
    

提交回复
热议问题