This is my code:
set var1="`netsh int ipv4 show interface ^| findstr /I Network`"
call:GetEles %var1%
goto:eof
:GetEles
for /F "tokens=1 usebackq" %%F IN (%~1) do echo %%F
goto:eof
When I check the command while it is running, the ^
becomes doubled inside function :GetEles
:
for /F "token=1 usebackq" %%F IN (`netsh int ipv4 show interface ^^| findstr /I Network`) do echo %%F
That doubled ^
makes my script failing, how can I solve it?