是否有包含剪贴板内容的环境变量? [英] Is there an Environment Variable that contains the clipboard contents?

查看:199
本文介绍了是否有包含剪贴板内容的环境变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有包含剪贴板当前内容的Bash环境变量(例如 $ CLIPBOARD 或类似)?

Is there a Bash environment variable (say $CLIPBOARD or similar) that contains the current contents of the clipboard?

具体示例是查看其路径刚刚复制到剪贴板的文件的前20行。

The specific example is to see the top 20 lines of a file whose path I have just copied into the clipboard.


  1. 复制路径 Ctrl-C

  2. 切换到终端

  3. 输入 Ctrl-V

  1. Copy path with Ctrl-C
  2. Switch to terminal
  3. Type more, Ctrl-V

UPDATE:我在CentOS 4上运行

UPDATE: I'm running on CentOS 4

推荐答案

不,没有bash环境变量。对于您的平台(不指定),您可以使用命令行工具,例如 xclip 或许多Windows实用程序之一(google为windows剪贴板命令行)。

No, there isn't a bash environment variable. For your platform (which you don't specify) you may be able to use a command line tool like xclip or one of the many Windows utilities (google for "windows clipboard command line").

这篇关于是否有包含剪贴板内容的环境变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆