That is to say, the for statement is to find in the information output by C:\bea\weblogic91\common\bin\wlst.cmd startserver.py, not what I want to find the variable status in startserver.py and get the value of status, right?
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
C:\TEMP\put>type a.txt
My name is Redtek~:)
C:\TEMP\put>set /p 我的名字=<a.txt
C:\TEMP\put>echo %我的名字%
My name is Redtek~:)
C:\TEMP\put>type a.txt
a
b
c
d
e
f
g
C:\TEMP\put>for /f %i in (a.txt) do set 变量=%i
(Notice carefully: The above line of command is executed. The following outputs are the assignment process when the above for is executed:)
C:\TEMP\put>set 变量=a
C:\TEMP\put>set 变量=b
C:\TEMP\put>set 变量=c
C:\TEMP\put>set 变量=d
C:\TEMP\put>set 变量=e
C:\TEMP\put>set 变量=f
C:\TEMP\put>set 变量=g
C:\TEMP\put>echo %变量%
g
@echo off
set server_status=Not started
for /f %%i in (a.txt) do (
if /i == ( set server_status=Started )
)
echo %server_status%