megnlingling 发表于 2018-8-27 09:22:51

window下批处理操作:WindDows下执行linux下的shell脚本

@echo ------------------------------------------------------  
@echo            WindDows下执行linux下的shell脚本
  
@echo ------------------------------------------------------
  

  

  
@set desIp=10.90.91.10
  
@set version=V10
  
@set compile_1=1
  
@set compile_2=1
  

  
ping %newCompileIp% -n 3
  

  
:compile_1
  
if %compile_1%==0 goto :compile_2
  
@echo ------------------------------------------------------
  
@echo            解压发布件文件
  
@echo ------------------------------------------------------
  
plink -l root -pw root root@%desIp% cd /home/test;./unziprelease.sh %version%
  
ping 127.0.0.1 -n 10
  

  
:compile_2
  
@echo ------------------------------------------------------
  
@echo            删除文件
  
@echo ------------------------------------------------------
  
plink -l root -pw root root@%desIp% cd /home/test;rm test.text
  
ping 127.0.0.1 -n 3
  
ping 127.0.0.1 -n 50
  
pause


页: [1]
查看完整版本: window下批处理操作:WindDows下执行linux下的shell脚本