Created
June 18, 2014 23:55
-
-
Save phette23/a7eb5d95a3ed8d2eef83 to your computer and use it in GitHub Desktop.
Pipe to Clipboard in Node.js (Mac OS X only)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var clipboard = require('child_process').spawn('pbcopy') | |
, data = 'put whatever data here'; | |
clipboard.stdin.write(data); | |
clipboard.stdin.end(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you!