- @echo off
- set str=你他娘的是谁?他娘的我不告诉你。你他娘的到底是谁?我他娘的还就不告诉那个他娘的你。
- echo %str:他娘的=TND%
- echo %str:他娘的=%
- pause
复制代码
学习了for,重新写
- @echo off
- setlocal enabledelayedexpansion
- for /f "tokens=*" %%i in (a.txt) do (
- set a=%%i
- set a=!a:他娘的=TND!
- echo !a!
- )
- for /f "tokens=*" %%i in (a.txt) do (
- set a=%%i
- set a=!a:他娘的=!
- echo !a!
- )
- pause
复制代码
[ 本帖最后由 zgq0301 于 2009-11-13 19:48 编辑 ] |