- @echo off&setlocal enabledelayedexpansion
- set "code=A B C D E F G H I J K L M N O P Q R S T U V W X Y Z"
- set /p str=请输入字母:
- for %%a in (%code%) do call,set "str=!str:%%a=%%a!"
- :loop
- if defined str (
- if not defined %str:~,1% set "%str:~,1%=a"&echo>>tmp %str:~,1%
- set "str=%str:~1%"&goto loop
- )
- for /f %%a in ('sort tmp') do set/p=%%a<nul
- del tmp &pause>nul
复制代码 产生了临时文件。 |