Created
September 18, 2017 05:40
-
-
Save timnew/6532a7bfe2b2dc663d99d4dd178fc382 to your computer and use it in GitHub Desktop.
Automatically replace text in clipboard
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
while true; do pbpaste | sed -e "s/name:production-db/\$server-master/g" | sed -e "s/name:production-replicadb/\$server-replica/g" | pbcopy; sleep 1; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Running the code in any shell, it monitors the clipboard, and do the replacement automatically.
So in the UI, the developer just need to copy and paste. The text will be updated automatically.
It is quite a magical way to replace specific text repeatedly in GUI.