加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

linux – stdout到gnu屏幕复制缓冲区

发布时间:2020-12-14 02:41:58 所属栏目:Linux 来源:网络整理
导读:GNU Screen中是否有命令将标准输出定向到复制缓冲区 我一直在用文件做很多工作,很高兴将我想要的文件名复制并传递给命令 例如 ls | grep proc $ls | grep calcalendar.inc-gen.php// enter copy mode$^a y // backward search for gen_chg? cal// start regi
GNU Screen中是否有命令将标准输出定向到复制缓冲区

我一直在用文件做很多工作,很高兴将我想要的文件名复制并传递给命令

例如

ls | grep proc

$ls | grep cal
calendar.inc-gen.php

// enter copy mode
$^a y 
// backward search for gen_chg
? cal
// start region
SPC
//goto to end of file by forward search php
php
// done 
ENT
// type command line
$git rm ^p
// creates
$git rm calendar.inc-gen.php

我知道使用bash脚本有更简单的方法可以做到这一点,但我经常发现自己需要终端屏幕上的专门信息,只需输入就可以了.

ls | grep cal > To_GNU_SREEN_COPY_:) or something

丹尼斯的解决方案起作用

您可能需要在.screenrc中设置缓冲区文件
bufferfile / tmp / screen-exchange

解决方法

这是一种方式:
echo -n cal* > /tmp/screen-exchange
screen -X readbuf    # or press Ctrl-a <
git rm ^a]           # type "git rm" then press Ctrl-a ]

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读