我正在将根目录中的每个 properties.log 文件:c:\executionsdktest_10.2.2 与参考文件进行比较。xx:xx:xx 格式的执行时间打印在 ref 和 properties.log 文件的 28 行的前 8 个字符中,因为时间会不同且无关紧要我想跳过包含的任何行的前 8 个字符一次。我怎样才能做到这一点?
REM assume <refLog>.txt exists
<!logPath! (
For /F "tokens=*" %%R in (!refLogPath!) DO (
set logLine=
set /p logLine=
set refLogLine=%%R
REM Check line by line of log against refLog
REM if corresponding lines mismatch: skip xx:xx:xx
if NOT "!logLine!"=="!refLogLine!" (
Echo.
Echo line below is Incorrect:
set lnCorrect=false
REM output to command line: can be put into .log/.txt later
REM output ANY and ALL incorrect line in log file
ECHO !logLine!
)
)
)