Skip to content

Instantly share code, notes, and snippets.

@hotchpotch
Created August 5, 2014 05:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hotchpotch/270c92ddaf359d56b087 to your computer and use it in GitHub Desktop.
Save hotchpotch/270c92ddaf359d56b087 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
# encoding: UTF-8
if `pbpaste`.match(/“(.*?)”/m)
target = $1.chomp
require 'open3'
puts target
Open3.popen3( 'pbcopy' ) {|input, _, _| input << target }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment