把两个文件中的不同之处提取到某个文件中去分享

复制代码 代码如下:
@echo off
:: 把两个文件中的不同之处提取到某个文件中去
::
cd.>3.txt
for /f “tokens=1* delims=:” %%i in (‘findstr /n . 1.txt’) do (
for /f “tokens=1* delims=:” %%x in (‘findstr /n . 2.txt’) do (
if %%i equ %%x if not “%%j”==”%%y” (>>3.txt echo 1:%%j&>>3.txt echo 2:%%y&>>3.txt echo.)
)
)


代码如下:
@echo off
:: 把两个文件中的不同之处提取到某个文件中去
::
cd.>3.txt
for /f “tokens=1* delims=:” %%i in (‘findstr /n . 1.txt’) do (
for /f “tokens=1* delims=:” %%x in (‘findstr /n . 2.txt’) do (
if %%i equ %%x if not “%%j”==”%%y” (>>3.txt echo 1:%%j&>>3.txt echo 2:%%y&>>3.txt echo.)
)
)

—-想了解更多的linux相关异常处理怎么解决关注<计算机技术网(www.ctvol.com)!!>



本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。

ctvol管理联系方式QQ:251552304

本文章地址:https://www.ctvol.com/uncategorized/49332.html

(0)
上一篇 2020年4月9日
下一篇 2020年4月9日

精彩推荐