我怎样才能得到一个脚本的输出将被复制到Windows剪贴板? [英] How can I get a script's output to be copied to the Windows clipboard?

查看:293
本文介绍了我怎样才能得到一个脚本的输出将被复制到Windows剪贴板?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现自己运行脚本和拷贝粘贴这些运行的输出到电子邮件或进入一些其他文件。有没有一种办法,这样我可以复制到剪贴板步骤脚本本身的一部分吗?我的大多数脚本都Perl或者批处理文件,我在Windows上运行。

I find myself running scripts and copy-pasting the output of these runs into emails or into some other documents. Is there a way such that I can make the copy-to-clipboard step a part of the script itself? Most of my scripts are either Perl or bat files and I work on Windows.

感谢。

推荐答案

有一个<一个href=\"http://www.labnol.org/software/tutorials/copy-dos-command-line-output-clipboard-clip-exe/2506/\">utility所谓clip.exe ,您可以使用。只是管你的脚本的输出或任何其他命令到clip.exe(首先,把你的路径上的某个地方。如果你没有对公用事业这些kindss一个老地方,你可以在你通常运行目录转储从,或者我认识的人你的脚本中使用 C:\\ WINDOWS \\ SYSTEM32 在紧要关头......):

There's a utility called clip.exe that you can use. Just pipe the output of your script or any other command into clip.exe (First, put it on your path somewhere. If you don't have a usual place for these kindss of utilities, you can dump it in the directory you usually run your scripts from, or I've known people to use c:\Windows\system32 in a pinch...):

somescript.bat | clip

然后粘贴了。

这篇关于我怎样才能得到一个脚本的输出将被复制到Windows剪贴板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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