简体   繁体   English

从命令行运行特定的Perl脚本

[英]run specific perl script from command line

Not that much experience programming, but I saw this open source code for one of those speed readers everyone is talking about and thought it would be cool to try to run it on my own computer. 没有那么多编程经验,但是我看到了每个人都在谈论的那些快速读者之一的开源代码,并认为尝试在自己的计算机上运行它是很酷的。

The files are available here: https://github.com/pasky/speedread 这些文件位于此处: https : //github.com/pasky/speedread

I was wondering what exactly I should type into the command prompt to get the program running. 我想知道我应该在命令提示符下键入什么才能使程序运行。 I already have a perl interpreter on my computer. 我的计算机上已经有一个perl解释器。 But I'm not sure how to get the program running. 但是我不确定如何使程序运行。 Sorry if this is a super noobish question. 抱歉,这是一个超级笨拙的问题。

I've tried 我试过了

perl C:\speadread-master\speedread (and yes, it was on the C: drive)

I got the error: 我得到了错误:

Use of encoding pragma is deprecated at C:\speadread-master\speedread line 39.
'stts' is not recognized as an internal or external command, operable program of batch file. 
←[31mc←[0←[K

I also tried (because it appears in the gifs on github) 我也尝试过(因为它出现在github的gif中)

~/speedread$ head -n 21 tea.txt | ./speedread -w 250

I got the error: 我得到了错误:

'~' is not recognized as an internal or external command, operable program or batch file

In addition to amon 's comment , wo points out a strong dependency to Unix commands/display, you also misinterpreted the head command: 除了amon注释 ,wo还指出了对Unix命令/显示的强烈依赖,您还误解了head命令:

~/speedread$ is a Unix command prompt , with ~ refering to your HOME directory ( USERPROFILE in Windows). ~/speedread$是Unix 命令提示符with ~表示您的HOME目录(在Windows中为USERPROFILE )。 You are not supposed to type it. 您不应该键入它。

The actual command is: 实际命令是:

head -n 21 tea.txt | ./speedread -w 250

Adn you have an head.exe (Windows version of the unix command head ) in your git msysgit distribution ( bin/head.exe ). 此外,您在git msysgit发行版( bin/head.exe )中有一个head.exe (unix命令head Windows版本)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM