批处理替换递增数字

mac2022-06-30  146

powershell -c  "$text=[IO.File]::ReadAllText('文本.txt',[Text.Encoding]::Default);[regex]::Replace($text, '#', {param($m); '第'+(++$n)+'个'})" > "结果.txt"

pause

转载于:https://www.cnblogs.com/aitiangua/p/7867737.html

最新回复(0)