cmd 批处理中setlocal enabledelayedexpansion的作用详细整理


参考:批处理中setlocal enabledelayedexpansion的作用详细整理 https://www.jb51.net/article/29323.htm

gnb项目的windows启动(涉及cmd中的延迟变量原理):.\sh\gnb_windows.cmd 1445

@echo off

setlocal enabledelayedexpansion

cd /d %~dp0


set nodeid=%1

if defined nodeid (
    echo nodeid is !nodeid!
) else (

    echo nodeid is NULL
	goto FINISH

)

rem start ..\bin\Window10_x86_64\gnb_es.exe -s -b ..\conf\!nodeid!\gnb.map --dump-address --upnp
rem ..\bin\Window10_x86_64\gnb.exe -i WindowsTun -c ..\conf\!nodeid!

rem 手动运行
rem start ..\bin\Window10_x86_64\gnb_es.exe -d -q -s -b ..\conf\1445\gnb.map  --upnp 
rem ..\bin\Window10_x86_64\gnb.exe --daemon -i WindowsTun -c ..\conf\1445 

start ..\bin\Window10_x86_64\gnb_es.exe -d -q -s -b ..\conf\!nodeid!\gnb.map  --upnp 
..\bin\Window10_x86_64\gnb.exe --daemon -i WindowsTun -c ..\conf\!nodeid! 

手动运行
:FINISH


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM