L
Larry
I am writing a script using the 'for' command that should list a line in the
output of a command. However it seems to hang. The syntax below is what I
have come up with. What I want to do is use the file cls.txt to house my
clustered server names and feed that to the uptime utility. Then scan the
output of that for a certain line of text (cluster availability). Could
someone offer me some advise on my syntax, this thing hangs up...
for /f %%a in (cls.txt) do (
uptime %%a /p:30 /v
findstr /i /c:"cluster availability"
)
Thank you, Larry
output of a command. However it seems to hang. The syntax below is what I
have come up with. What I want to do is use the file cls.txt to house my
clustered server names and feed that to the uptime utility. Then scan the
output of that for a certain line of text (cluster availability). Could
someone offer me some advise on my syntax, this thing hangs up...
for /f %%a in (cls.txt) do (
uptime %%a /p:30 /v
findstr /i /c:"cluster availability"
)
Thank you, Larry