batch file never ends
Posted: 01 Dec 2015 15:17
This is probably an issue with Linux, but it might be solvable in a batch file. So here it goes.
Running the batch file below, will run "ls" on as many Linux servers exist in "ip.txt"
for /f "tokens=*" %%a in (%~dp0ip.txt) do (
%~dp0plink -batch -ssh -pw pass root@%%a "ls"
)
Running the batch file below will run the command "start"
The problem is that the command "start" is not like "ls". "start" just keeps running, so the batch file never continues to the next server in "ip.txt"
for /f "tokens=*" %%a in (%~dp0ip.txt) do (
%~dp0plink -batch -ssh -pw pass root@%%a "/etc/start"
)
Is there a way to solve this issue?
Thanks
Running the batch file below, will run "ls" on as many Linux servers exist in "ip.txt"
for /f "tokens=*" %%a in (%~dp0ip.txt) do (
%~dp0plink -batch -ssh -pw pass root@%%a "ls"
)
Running the batch file below will run the command "start"
The problem is that the command "start" is not like "ls". "start" just keeps running, so the batch file never continues to the next server in "ip.txt"
for /f "tokens=*" %%a in (%~dp0ip.txt) do (
%~dp0plink -batch -ssh -pw pass root@%%a "/etc/start"
)
Is there a way to solve this issue?
Thanks