Windows 批处理脚本-如何显示从cURL到生成批处理脚本的控制台屏幕的输出

Windows 批处理脚本-如何显示从cURL到生成批处理脚本的控制台屏幕的输出,windows,batch-file,curl,Windows,Batch File,Curl,我一直在尝试创建一个批处理脚本,该脚本使用cURL发送HTTPPOST请求。在cURL命令中,我告诉它输出到stdout(http\u代码、time\u总计、url\u有效)。我一直在每个cURL命令之间使用“timeout/t20”,这就是我在运行脚本时看到的全部内容,因为cURL正在另一个控制台窗口中运行(该窗口在一瞬间消失) 以下是一些源代码: @echo off rem ----------------------------------------------------------

我一直在尝试创建一个批处理脚本,该脚本使用cURL发送HTTPPOST请求。在cURL命令中,我告诉它输出到stdout(http\u代码、time\u总计、url\u有效)。我一直在每个cURL命令之间使用“timeout/t20”,这就是我在运行脚本时看到的全部内容,因为cURL正在另一个控制台窗口中运行(该窗口在一瞬间消失)

以下是一些源代码:

@echo off

rem -----------------------------------------------------------
rem SCRIPT TO REBOOT AND CHANGE ENCODE TO H264 FOR ACTI CAMERAS
rem -----------------------------------------------------------

rem SCRIPT NAME: ACTI ROOFTOP CAMERAS (REBOOT)
rem ------------------------------------------

start "" C:\curl\curl -sL -d "?USER=user&PWD=pass&SAVE_REBOOT" -w "\n%{http_code}\t %{time_connect}\t %{url_effective}\n" "http://192.168.0.30:80/cgi-bin/system" -o stdout
timeout /t 20

start "" C:\curl\curl -sL -d "?USER=user&PWD=pass&SAVE_REBOOT" -w "\n%{http_code}\t %{time_connect}\t %{url_effective}\n" "http://192.168.0.31:80/cgi-bin/system" -o stdout
timeout /t 20

start "" C:\curl\curl -sL -d "?USER=user&PWD=pass&SAVE_REBOOT" -w "\n%{http_code}\t %{time_connect}\t %{url_effective}\n" "http://192.168.0.32:80/cgi-bin/system" -o stdout
timeout /t 20
所以我想得到的结果是:

200    2.00s    http://192.168.0.30:80/cgi-bin/system

Waiting for 15 seconds ...

200    2.00s    http://192.168.0.31:80/cgi-bin/system

Waiting for 15 seconds ...

200    2.00s    http://192.168.0.32:80/cgi-bin/system

非常感谢您提供的任何帮助。

使用
start
/b
标志不生成新窗口。或者完全忽略
start
<代码>开始用于需要非典型行为时。有关不使用和使用
start
启动程序的说明,请参见
start/?
。感谢各位提供的信息。我会继续调查的。