shadowbat
17-12-2019, 12:58
подскажите, как заменить %t% на "the" (пятая строка)
@echo off
set t=teh
set str=%t% cat in %t% hat
echo.%str%
set str=%str:%t%=the%
echo.%str%
pause
shadowbat
17-12-2019, 13:43
@echo off
SetLocal EnableDelayedExpansion
set t=teh
set str=%t% cat in %t% hat
echo.%str%
set str=!str:%t%=the!
echo.%str%
pause
@echo off
set t=teh
set str=%t% cat in %t% hat
echo.%str%
call set str=%%str:%t%=the%%
echo.%str%
pause
@echo off
set t=teh
set str=%t% cat in %t% hat
echo.%str%
call echo.%%str:%t%=the%%
pause
vBulletin v3.6.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.