回复 3# tianyaoxing - @echo off
- SetLocal EnableDelayedExpansion
- set/p v=请输入要删除的行号并回车,若指定多行请用空格隔开(如:2 5 8):
- for %%i in (%v%) do (
- set x=!x! %%i
- echo !x!
- )
- pause
复制代码
- @echo off
- SetLocal EnableDelayedExpansion
- set/p v=请输入要删除的行号并回车,若指定多行请用空格隔开(如:2 5 8):
- for %%i in (%v%) do (
- set x=%%i
- echo !x!
- )
- pause
复制代码 你分别执行这两个代码,看看一样吗? |