Created
September 24, 2011 08:40
-
-
Save hitode909/1239124 to your computer and use it in GitHub Desktop.
クリップボードを監視して標準出力に表示
This file contains 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
#! /usr/bin/env ruby | |
last = nil | |
loop { | |
current = `pbpaste` | |
if last != current | |
puts current | |
last = current | |
end | |
sleep 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment