usernamenumber ([personal profile] usernamenumber) wrote2014-04-13 10:37 am
Entry tags:

OSX CLI tip: pbpaste. Use CLI tools on copied text!

Hey OSX+CommandLine people... I just had one of those "this tool would be so useful, maybe it exists... holy crap it does!" moments. Behold the simple glory that is pbpaste, which dumps your cut/paste buffer to stdout (there's also a pbcopy for stdin->buffer).

Need to open a bunch of links from an email? No more "click link, switch windows, repeat a zillion times" for me, no sir! Now all I have to do is copy text, switch to terminal and...

pbpaste | egrep 'http.?://' | xargs open

Boom! Mind. Blown.