批量记录帮助
好吧,我有一个在批处理的帮助下运行的程序。它是一个由 EXE 文件运行的 PHP 脚本。 如何才能在程序运行时将输出自动发送到文件(例如 log.txt),并同时将输出显示在屏幕上?
我尝试了类似program.exe>>的东西log.txt,但屏幕上没有显示输出。
Well, I have this program that I run with the help of batch. Its a PHP script that is ran by an EXE file.
How can I have it that while the program is running, the output is automatically sent to a file, say log.txt, and have the output simultaneously shown on screen?
I tried something like program.exe >> log.txt, but that didnt show output on the screen.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您只想使用 Windows 命令来执行此操作,您可能应该尝试这样的操作:
Windows 命令中没有尾部等效项。
If you want to do it only with windows commands may be you should try something like this:
there is no tail equivalent in windows commands.
“在屏幕上显示输出”是指更新已打开的屏幕/控制台窗口上的文件内容。
如果是,您可以使用以下命令
请注意,“tail”在 Windows 基本安装中不可用,但您可以下载它(免费)。寻找适用于 Windows 的 unixUtils。
By 'show output on the screen' do you mean updating the file contents on an already opened screen/console window.
If yes, you can use the following command
Please note that 'tail' is not available with base installation of windows, but you can download it (free). look for unixUtils for windows.