YSYHZ 当前离线
列兵
@echo off set end=" " set sp=" " if "%end%" equ "%sp%" (echo change ) else (echo no change) pause复制代码
@echo off if " " equ " " (echo change ) else (echo no change) pause复制代码
@echo off set end=" " set sp=" " if end == sp (echo change ) else (echo no change) pause复制代码
TOP
Five66 当前离线
上尉
qixiaobin0715 当前离线
大校
@echo off set "str= a. bc " for /f "delims=" %%i in ("%str%") do echo,%%~nxi pause复制代码
hfxiang 当前在线
sed -i.bak -r "s/[ \t]*$//" 1.txt复制代码
aloha20200628 当前在线
少校
@echo off set end=" " set sp=" " if %end% equ %sp% (echo change) else (echo no change) pause复制代码
@echo off set "end= " set "sp= " if "%end%" equ "%sp%" (echo change) else (echo no change) pause复制代码
77七 当前离线
中校
@echo off set str=" " setlocal enabledelayedexpansion if "!str:~-1!" equ " " ( set "str=!str:~0,-1!" ) endlocal & set "str=%str%" rem echo [%str%] pause复制代码