在 Windows 中,我使用命令行剪贴板复制和粘贴实用程序...
pclip.exe 和 gclip.exe 这些是 Windows 的 UnixUtils 端口(但它们只处理纯文本)。还有一些其他本地Windows 实用程序可以写入/提取任何格式。
我在 Synaptic Package Manager 中寻找过类似的东西,但找不到任何东西。
有什么东西,我错过了吗?...或者这可能在 Bash 脚本中可用?
我想要的实用程序类型将能够通过 std-in/std-out 或 file-in/file-out 读/写,并处理 Unicode、富文本格式、图片等剪贴板格式...
注意:我不是在追求剪贴板管理器。
I'm building a command line tool in order to make some of my tasks more efficient. I need to be able to write content to the clipboard, but for some reason it's not working for me.
I've tried installing both xclip and xsel, but both have the same behavior: they can read/write to the clipboard fine, but I cannot access it from the main Ubuntu GUI.
I've also tried it in the terminal...
echo "hello" | xclip
Run Code Online (Sandbox Code Playgroud)
Then if …