我有一个包含文件的文件夹:File1.txt 和 File2.txt
file1.txt 的内容为:
"DTS053C0 RUN DATE 10/01/11 DATATRAK SYSTEM PAGE 001
RUN TIME 13:35:08
INPUT PROGRAM TRANSMISSION STATUS REPORT
STATUS - INPUT RECEIVED BY DTCC'S DATATRAK SYSTEM
DETAIL RECORDS RECEIVED 0
HEADER RECORD RECEIVED
HDR.SSYSID.E00.CORIG.SSUBOMMDDYYYY HEADERFILEDESCRIPTION N001 *
REJECTED
NO MATCH ON EXPECTED MASTER FOR HEADER"
file2.txt 的内容是:
"The confirm file received from DTCC will be in the following format:
DTS053C0 RUN DATE 10/01/11 DATATRAK SYSTEM PAGE 001
RUN TIME 12:53:32
INPUT PROGRAM TRANSMISSION STATUS REPORT
STATUS - INPUT RECEIVED BY DTCC'S DATATRAK SYSTEM
DETAIL RECORDS RECEIVED 22
HEADER RECORD RECEIVED
HDR.SSYSID.E00.CORIG.SSUBOMMDDYYYY HEADERFILEDESCRIPTION N001 *
ACCEPTED
Example"
我正在寻找一个批处理脚本来分别扫描这两个文件的内容并识别包含单词“REJECTED”的文件,然后向我的电子邮件 ID 发送一封电子邮件,如通知“此文件已被拒绝,请查看”。
- 我正在使用 blat 发送电子邮件作为通知 *