freesoft00 当前离线
六级士官
@echo off pushd %~dp0 for /f "delims=" %%i in (1.txt) do ( echo,%%~dpi333%%~nxi% )>>3.txt pause复制代码
tmplinshi 当前离线
版主
sed -r "s/[^\\]+$/333\0/" a.txt > 3.txt复制代码
TOP
yangfengoo 当前离线
上尉
@echo off setlocal enabledelayedexpansion for /f "tokens=*" %%a in (1.txt) do ( set #=%%a set #=!#:%cd%=! echo,!#:%%~nxa=! 333 %%~nxa ) pause复制代码
Bella 当前离线
三级士官
sed -r "/^:|\*\x22?$/d;s/[^\]+$/333&/" 1.txt>3.txt复制代码
terse 当前离线
中将
@if(0)==(0) echo off & cscript -NoLogo -E:JScript %0 <1.txt "333" >3.txt & pause & exit @end var re = /(.*?)([^\\]*$)/; var s = WScript.Arguments.Item(0); while(!WScript.StdIn.AtEndOfStream){ var str = WScript.StdIn.ReadLine(); WSH.Echo(str.replace( re, function(a,b,c) {return(b+s+c)} )); }复制代码
/zhqsystem/zhq 当前离线
中尉