Copy shell script output to clipboard

后端 未结 6 461
灰色年华
灰色年华 2020-12-23 17:09

Is there any easy way to implement the copy to clipboard option from the output of a shell script ?

6条回答
  •  悲&欢浪女
    2020-12-23 17:31

    You can use pbcopy which is native for Mac OS.

    Try this command:

    echo "variable" | pbcopy
    

    it will copy the string "variable" into your clipboard.

提交回复
热议问题