Copy a string to clipboard from Mac OS command line

前端 未结 2 1733
灰色年华
灰色年华 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:21

    echo 'your-email@example.com' | pbcopy (as @Jonathan Leffler stated above)

    Or see the answer for the related question on piping to clipboard on different operating systems: Pipe to/from the clipboard in Bash script

提交回复
热议问题