
| Quote: | |
|
| Quote: | |
|
CODE: [Copy to clipboard]@echo off
cd.>2.txt
setlocal enabledelayedexpansion
for /f "delims=" %%i in (1.txt) do (
set var=%%i
set "var=!var:A=啊!"
set "var=!var:a=阿!"
set "var=!var:B=不!"
set "var=!var:b=把!"
set "var=!var:C=才!"
set "var=!var:c=出!"
set "var=!var:1=o!"
set "var=!var:2=e!"
set "var=!var:3=u!"
set "var=!var:4=i!"
set "var=!var:5=u!"
set "var=!var:6=v!"
set "var=!var:7=l!"
set "var=!var:9=y!"
>>2.txt echo !var!
)
start 2.txt
| Quote: | ||||
|
CODE: [Copy to clipboard]sed 下载地址:http://www.student.northpark.edu/pemente/sed/gsed407x.zipsed "y/AaBbCc0123456789/啊阿不把才出aoeuiuvlby/" file.txt
CODE: [Copy to clipboard][ Last edited by pengfei on 2006-10-16 at 21:36 ]@echo off
cd.>2.txt
setlocal enabledelayedexpansion
for /f "delims=" %%i in (test.txt) do (
set var=%%i
call :go
set "var=!var:1=o!"
set "var=!var:2=e!"
set "var=!var:3=u!"
set "var=!var:4=i!"
set "var=!var:5=u!"
set "var=!var:6=v!"
set "var=!var:7=l!"
set "var=!var:9=y!"
>>2.txt echo !var!
)
start 2.txt
exit
:go
set tmp=%var%@
set var=
:go_
if not "%tmp:~0,1%"=="@" (
set var_=%tmp:~0,1%
if "!var_!"=="A" set var_=啊
if "!var_!"=="a" set var_=阿
if "!var_!"=="B" set var_=不
if "!var_!"=="b" set var_=把
if "!var_!"=="C" set var_=才
if "!var_!"=="c" set var_=出
set var=!var!!var_!
set tmp=!tmp:~1!
goto go_
)
goto :eof
| Quote: | |
|
| Quote: | ||||
|
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |