Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Convert pasteboard string into JSON
#!/usr/bin/env node
require("child_process").exec("pbpaste", function(_, stdout){

This comment has been minimized.

Copy link
Owner Author

@novemberborn novemberborn commented Apr 2, 2011

Save as pbjson, do chmod +x pbjson, then use ./pbjson|pbcopy.

I suppose the pasteboard commands only work on OS X.

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