如何使用 Perl 打开命令提示符?
好吧,再读一遍。我需要用 perl 打开 Windows 提示符。这是因为我想要多个提示并行运行 perl 脚本,但不想手动打开它们。因此,我想要一个可以调用(主机)的脚本,告诉要打开的命令提示符的数量(客户端)、要运行的客户端脚本的路径,甚至在客户端询问时输入输入。因此,有两件事:
如何使用 perl 脚本打开提示
如何将输入传递给该提示
谢谢! (PS,我知道运行一个调用相同主机脚本的主机脚本将是一个巨大的错误,希望我的老板不会这样做:P)
Ok, read that again. I need to open a windows prompt WITH perl. This is because I want multiple prompts running perl scripts in parallel, but don't want to open them all by hand. So I want a script that I can call (host), tell the number of command prompts to open (clients), path to the client script to run, and even put in inputs if the clients ask. So, two major things:
How to open a prompt with a perl script
How to pass input to that prompt
Thanks! (P.S. I know that it would be a huge mistake to run a host script that calls the same host script, hopefully my boss doesn't do that :P)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
可以这么说,这可能不是 Perl 问题,而是 Windows 问题。我怀疑你想要做的是调用“start
例如:
这应该在新窗口中启动所需的命令并立即返回。输入
start /?
以获得其他选项,这些选项可以更改新脚本的优先级、隐藏下一个窗口或在当前窗口中运行。This might not be a Perl question, so to speak, but a Windows question. I suspect what you want to do is call "start <options> <script>".
For example:
This should start the desired command in a new window and return immediately. Type
start /?
for other options which can change the new script's priority, hide the next window, or run in the current window.这是一个 DOS/Windows 问题,而不是 Perl 问题。
请
参阅
start /?
和cmd /?
。This is a DOS/Windows question, not a Perl one.
Use
See
start /?
andcmd /?
.