Skip to content

Instantly share code, notes, and snippets.

@phette23
Created June 18, 2014 23:55
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phette23/a7eb5d95a3ed8d2eef83 to your computer and use it in GitHub Desktop.
Save phette23/a7eb5d95a3ed8d2eef83 to your computer and use it in GitHub Desktop.
Pipe to Clipboard in Node.js (Mac OS X only)
var clipboard = require('child_process').spawn('pbcopy')
, data = 'put whatever data here';
clipboard.stdin.write(data);
clipboard.stdin.end();
@dimatter
Copy link

dimatter commented May 7, 2015

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment