use*_*359 1 perl command-line batch-file command-prompt
我在Windows中编写了一个perl脚本,它生成一行或两行输出.
我希望能够从命令行运行脚本n = 100次而不在脚本中进行更多编码(除非有一种简单的方法)并收集输出?我有人建议批处理文件可能有序吗?
基本上,有一种简单的方法:
[perl script.pl >> output + [Enter Key]] # n times in cmd
谢谢!
您可以在批处理文件中使用FOR循环:
for /L %%N IN (1, 1, 100) DO perl script.pl >> output.txt
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
118 次 |
| 最近记录: |