发布时间:2019-07-04 10:05:31编辑:auto阅读(2203)
;要打开的文件
Local $file = FileOpen("D:\au3_test\ice2.conf", 0)
Local $file2 = FileOpen("D:\au3_test\ice.conf", 0)
; 检查打开的文件是否可读
If $file = -1 Then
MsgBox(0, "错误", "不能打开文件.")
Exit
EndIf
$i = 1
; 每次读取一行文本,直到文件结束.
While 1
Local $line = FileReadLine($file)
If @error = -1 Then
ExitLoop
EndIf
Local $line2 = FileReadLine($file2)
If @error = -1 Then
ExitLoop
EndIf
;比较对应行号的行是否相同,不相同则输出不同的行到文件diff.txt
If $line <> $line2 Then
Local $file3 = FileOpen("D:\au3_test\diff.txt", 1)
; 检查打开的文件是否可写
If $file3 = -1 Then
MsgBox(0, "错误", "不能打开文件.")
Exit
EndIf
FileWriteLine($file3, @CRLF&"第"&$i&"行配置不一致"&@CRLF&"file1:"&$line&@CRLF&"file2:"&$line2&@CRLF)
FileClose($file3)
EndIf
$i = $i + 1
Wend
FileClose($file)
上一篇: Router Configuration
下一篇: Linux目录学习(3)---/usr/
 51197
 50616
 41238
 38053
 32516
 29423
 28283
 23141
 23098
 21436
 1493°
 2206°
 1830°
 1759°
 2067°
 1817°
 2501°
 4200°
 4062°
 2899°