@璐村惂鐢ㄦ埛_000076K馃惥 off
setlocal enabledelayedexpansion
set str=abcdef0123456789
set str1=0123456789abcdef
set str2=a3456789bcdef012
set str3=ab56789cdef01234
set str5=abc3456789def012
set str6=0123456cdef789ab
set str7=a89bc34567def012
set str8=6f012ab534789cde
set /a rnd=%random%%%16
setstr4=%%str:~%rnd%,1%%%%str1:~%rnd%,1%%%%str2:~%rnd%,1%%%%str3:~%rnd%,1%%
call echo %str4%
setstr9=%%str5:~%rnd%,1%%%%str6:~%rnd%,1%%%%str7:~%rnd%,1%%%%str8:~%rnd%,1%%
call echo %str9%
echo %str9%
echo %str4%
pause
ping 2001:0250:301f:0105:1::3:%str9%
ping 2001:0250:301f:0105:1::3:%str4%
pause
netsh interface ipv6 set address"ipv6" 2001:0250:301f:0105:1::%str9%
netsh interface ipv6 del address"ipv6" 2001:0250:301f:0105:1::%str9%
pause
请教一下。变量str4 和str9如何才能把call echo结果赋值和提取使用?现在的str4和str9都是随机的过程值不是结果值。
setlocal enabledelayedexpansion
set str=abcdef0123456789
set str1=0123456789abcdef
set str2=a3456789bcdef012
set str3=ab56789cdef01234
set str5=abc3456789def012
set str6=0123456cdef789ab
set str7=a89bc34567def012
set str8=6f012ab534789cde
set /a rnd=%random%%%16
setstr4=%%str:~%rnd%,1%%%%str1:~%rnd%,1%%%%str2:~%rnd%,1%%%%str3:~%rnd%,1%%
call echo %str4%
setstr9=%%str5:~%rnd%,1%%%%str6:~%rnd%,1%%%%str7:~%rnd%,1%%%%str8:~%rnd%,1%%
call echo %str9%
echo %str9%
echo %str4%
pause
ping 2001:0250:301f:0105:1::3:%str9%
ping 2001:0250:301f:0105:1::3:%str4%
pause
netsh interface ipv6 set address"ipv6" 2001:0250:301f:0105:1::%str9%
netsh interface ipv6 del address"ipv6" 2001:0250:301f:0105:1::%str9%
pause
请教一下。变量str4 和str9如何才能把call echo结果赋值和提取使用?现在的str4和str9都是随机的过程值不是结果值。