批处理文件疑惑
我有一个如下所示的 .bat 文件,我想将 IDE 中的全部内容重定向到某个文本文件。
D:\WindRiver\wrenv.exe -p vxworks653-2.2.3 run
D:\WindRiver\wrenv.exe -p vxworks653-2.2.3>C:\ThreePartition\output.txt
PAUSE
我只能得到一些部分输出,即我无法得到编译或构建过程中抛出的错误。 这是正确的还是任何人都可以建议任何其他方式?
多谢 麦迪
I have a .bat file shown below in which I want to redirect the whole contents present in my IDE to some text file.
D:\WindRiver\wrenv.exe -p vxworks653-2.2.3 run
D:\WindRiver\wrenv.exe -p vxworks653-2.2.3>C:\ThreePartition\output.txt
PAUSE
I am able to just get some partial output i.e I am unable to get the errors which are thrown during compilation or building process.
Is this correct or Can anyone suggest any other way??
Thanks a lot
Maddy
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你可以试试这个:
D:\WindRiver\wrenv.exe -p vxworks653-2.2.3 > C:\ThreePartition\output.txt 2>&1
你可以找到一个很好的解释此处。 基本上,您需要将 stdout 和 stderr 重定向到您的文件。
此致。
You can try this:
D:\WindRiver\wrenv.exe -p vxworks653-2.2.3 > C:\ThreePartition\output.txt 2>&1
You can find a good explanation here. Basically you need to redirect both stdout AND stderr to your file.
Best regards.
您的批处理正在重定向来自 wrenv.exe 发送到标准输出的所有消息。
我从未使用过 WinRiver,但通常 IDE 会在内部管理控制台,并且不会在标准输出/错误流上记录任何消息。
不过,也许可以设置 IDE 控制台的输出。 如果是,请尝试将其设置为标准输出。
Your batch is redirecting all messages from wrenv.exe that are sent to the standard output.
I never used WinRiver but usually IDEs manage the console internally and don't log any messages on the standard output/error stream.
It is maybe possible to set the output of the console of the IDE though. If it is, try to set it to the standard output.
我认为您想将这两行合并为一行:
好的,看看您的帖子 此处,此处和此处,看来你想记录编译过程。 其命令类似于(全部在一行):
假设有一个名为 ThreePartition.mak 的文件。
到目前为止,您一直使用的命令旨在简单地打开一个可以在其中键入命令的界面,这就是您没有得到任何输出的原因。 如果您想记录模拟或内核构建,有一个名为
vxworks_cli_tools_users_guide_6.6.pdf
的文件,它描述了命令行界面,包括vxprj
的详细信息。另外,您真的使用 nant 脚本来调用 .vbs 来调用 .bat 来调用 wrenv.exe 吗? 我确信有一种更简单的方法可以做到这一点。
I think you want to combine both those lines into one:
OK, looking at your posts here, here and here, it seems you want to log the compilation process. The command for that will be something like (all on one line):
Assuming there's a file called ThreePartition.mak.
The command you've been using so far is designed to simply open an interface where you can type commands, which is why you get no output. If you want to log simulation, or a kernel build, there is a file called
vxworks_cli_tools_users_guide_6.6.pdf
which describes the command line interface, includingvxprj
in full detail.Also, are you really using a nant script to call a .vbs to call a .bat to call wrenv.exe? I'm sure there's a simpler way to do that.