Skip to content

Instantly share code, notes, and snippets.

@Tokubara
Created May 30, 2021 08:22
Show Gist options
  • Select an option

  • Save Tokubara/a4ccfa5cdbb3cc6a208cf978157bcbe1 to your computer and use it in GitHub Desktop.

Select an option

Save Tokubara/a4ccfa5cdbb3cc6a208cf978157bcbe1 to your computer and use it in GitHub Desktop.
把mac的剪切板传输到ubuntu
cm2u () {
host=parallels@10.211.55.10
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"
}
@Tokubara
Copy link
Copy Markdown
Author

问题是, 由于好用的Parallels Tools的存在, 我没法知道, 到底是我的脚本起作用了, 还是Parallels Tools的功劳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment