Created
October 17, 2012 19:05
-
-
Save focusaurus/3907446 to your computer and use it in GitHub Desktop.
Transfer clipboard text from one mac to another via netcat
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
NCSEND_PORT=6666 | |
ncsend() { | |
local DEST_HOST="${1-smair}" | |
pbpaste | nc "${DEST_HOST}" "${NCSEND_PORT}" | |
} | |
ncreceive() { | |
while true | |
do | |
nc -l "${NCSEND_PORT}" | tee /dev/tty | pbcopy | |
sleep 1 | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment