是否可以在Bash中管道进出剪贴板?
无论是与设备手柄之间的管道连接还是使用辅助应用程序,我找不到任何东西.
例如,如果/dev/clip是链接到剪贴板的设备,我们可以这样做:
cat /dev/clip # Dump the contents of the clipboard
cat foo > /dev/clip # Dump the contents of "foo" into the clipboard
Run Code Online (Sandbox Code Playgroud) 我有一个文本文档,其中包含以这种格式的一堆URL:
URL = "sitehere.com"
Run Code Online (Sandbox Code Playgroud)
我要做的是运行curl -K myfile.txt,并将响应Curl的输出返回到文件中.
我怎样才能做到这一点?
它说,我正在关注生成SSH密钥
sudo apt-get install xclip
#下载并安装xclip.如果没有
apt-get,可能需要使用其他安装程序(如yum)xclip -sel clip <〜/ .ssh/id_rsa.pub
#将id_rsa.pub文件的内容复制到剪贴板
但是在我跑完之后xclip -sel clip < ~/.ssh/id_rsa.pub我得到了Error: Can't open display: (null)
什么问题?我用Google搜索,但一无所获
我正在使用IPython Qt控制台,当我从Ipython复制代码时,就会出现这样的情况:
class notathing(object):
...:
...: def __init__(self):
...: pass
...:
Run Code Online (Sandbox Code Playgroud)
有没有办法复制它们没有那些领先的三点和双立方?
PS我尝试了两个Copy并Copy Raw Text在上下文菜单中,它仍然是相同的.操作系统:Debian Linux 7.2(KDE).
我看过这篇文章:how-can-i-copy-the-output-of-a-command-directly-into-my-clipboard
我有这个别名
# Redoes the last command and copies the output to clipboard
alias cl="fc -e -|pbcopy"
Run Code Online (Sandbox Code Playgroud)
但是,我想要一个别名或一个函数,它不会重做最后一个命令,但会复制最后一个命令的输出。