Created
May 30, 2021 08:22
-
-
Save Tokubara/a4ccfa5cdbb3cc6a208cf978157bcbe1 to your computer and use it in GitHub Desktop.
把mac的剪切板传输到ubuntu
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
cm2u () { | |
[email protected] | |
port=22 | |
# tmp_file_path=$(mktemp -t clipboard.XXXXXX) | |
tmp_file_path=/tmp/clipboard.m2h | |
pbpaste > $tmp_file_path | |
scp -q -P $port $tmp_file_path $hpc_host:/tmp/ | |
ssh -X -p $port $host "xclip -i -sel c < $tmp_file_path" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
问题是, 由于好用的Parallels Tools的存在, 我没法知道, 到底是我的脚本起作用了, 还是Parallels Tools的功劳