我想结合 Windows 批处理脚本和 plink.exe 工具(http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)并作为循环运行但没有运气,下面是我的。感谢您的帮助
@echo off
for /f %%i in (D:\script\ip.txt) do (
pushd C:\Windows\System32\tools
plink.exe -l root -pw xxxx root@%%i lsb_release -sr | grep 12.04
if ERRORLEVEL 1 (
msg * Sorry, this is NOT a Precise version
exit
) else
(
pushd C:\Windows\System32\tools
msg * Cheers, welcome to Precise!
)
)
或者它只是将 Windows 批处理脚本作为循环运行。
if it is Ubuntu 10.04
do nothing
else if (meant, it's Ubuntu 12.04)
already LibreOffice installed
do nothing
else
install LibreOffice
exit
并重复到 ip.txt 文件中的下一个 IP 地址