Created
March 16, 2017 04:11
-
-
Save dannofx/386aafc673cca176b6358d0c5a028e1a to your computer and use it in GitHub Desktop.
macOS: Watches the content of the clipboard every 0.5 seconds and print it out to the general output.
This file contains hidden or 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
#!/bin/bash | |
LAST_TEXT= | |
while : | |
do | |
CURRENT_TEXT=`pbpaste` | |
if [ "$LAST_TEXT" != "$CURRENT_TEXT" ] | |
then | |
echo $CURRENT_TEXT | |
echo "" | |
LAST_TEXT=$CURRENT_TEXT | |
fi | |
sleep 0.5 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment