pyhouse 当前离线
列兵
评分人数
CrLf 当前离线
论坛巡查
@echo off for /f "delims=" %%a in (a.txt) do set "n=%%a" for /f "delims=[]" %%a in ('find /n ^"%%n:"=""%%"^<b.txt') do more +%%a b.txt >>a.txt复制代码
TOP
pcl_test 当前离线
荣誉版主
@echo off for /f "delims=" %%a in ('type "a.txt"') do set "laststr=%%a" for /f "tokens=1* delims=:" %%b in ('findstr /r /n /c:"%laststr%" "b.txt"') do set "n=%%b" echo.>>"a.txt" >>"a.txt" more +%n% "b.txt" pause复制代码
愤怒的CMD 当前离线
上等兵
DAIC 当前离线
中将
gawk "NR==FNR{a[$0]=$0;print}NR>FNR{if(!($0 in a))print}" a.txt b.txt > c.txt复制代码
回复 愤怒的CMD DAIC 发表于 2015-3-16 11:15
bbbbbbbb cccccccccc dddddddd eeeeeeee aaaaaaaa bbbbbbbb复制代码
aaaaaaaa bbbbbbbb cccccccccc dddddddd eeeeeeee aaaaaaaa bbbbbbbb复制代码
tigerpower 当前离线
四级士官
awk "{print}" A>C && diff -u C B|sed -n "4,$s/^+//p" >>C复制代码
@sed -n "$=" a.txt|sed "s/.+/1,&d/"|sed -f - b.txt>>a.txt复制代码