
CODE: [Copy to clipboard]sed -i '$ s/.*/IP 2=192.168.2.8/g' conf.ini
CODE: [Copy to clipboard]set ip=192.168.0.1
sed -i "s/\(HostRestrictions=.*\)/\1\\\/%ip%/g" cf.ini
CODE: [Copy to clipboard]对比如果与%ip2%值相同则批处理结束,如果相比IP值不同则执行如下语句后结束:for /f "tokens=15 skip=1" %%i in ('ipconfig ^| find /i "ip address"') do set ip2=%%i
CODE: [Copy to clipboard][ Last edited by qwertl on 2010-1-6 at 18:29 ]sed -i '$ s/.*/IP 2=%ip2%/g' c:\app\conf.ini
net stop "servername"
ping 127.0.0.1 -n 50 >nul
net start "servername"

| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |