我需要从OMO帐户迁移日志中选择两个MSISDN值,并打印不匹配的值。
[2019-03-11 04:15:08 INFO-SUBAPP ESBRestClient:117] ## IP-103.228.158.85##TOKEN-201903110416276787774(**923419606907**)RESPONSE-BODY: {"callStatus":"false","responseCode":"18","description":"OMO account migration – **923481057772**"}
[2019-03-11 04:24:02 INFO-SUBAPP ESBRestClient:117] ## IP-119.153.134.128##TOKEN-1552260212780839(923214748517)RESPONSE-BODY: {"callStatus":"false","responseCode":"18","description":"OMO account migration – 953214748517"}
923481057772
是旧的 MSISDN。
923419606907
是新的 MSISDN,我需要将其保存在一个新文件中。我一直在使用以下命令来只选择新的 MSISDN:
cat migration.txt | egrep "OMO account migration" | egrep "responseCode\":\"1700" | awk -F"(" '{gsub(/\).*/,"",$2);print $2}' >>newmsisdn.txt
我正在使用保存的msisdn值来获取令牌号码。然后,我使用这些令牌来获取多个参数。最终输出如下:
Date Time Old MSISDN New MSISDN Old Profile New Profile CNIC Acc Status Acc Status Migration Channel
(Before) (After)
2019-03-11 | 00:00:14 | 923135260528 | 923029403541 | OMO BVS MA | 0 | 1620221953175 | ACTIVE | | subapp
2019-03-11 | 00:00:14 | 923135260528 | 923003026654 | OMO BVS MA | 0 | 1620221953175 | ACTIVE | | subapp
2019-03-11 | 00:00:14 | 923135260528 | 923003026654 | OMO BVS MA | 0 | 1620221953175 | ACTIVE | | subapp
2019-03-11 | 00:00:14 | 923135260528 | 923038048244 | OMO BVS MA | 0 | 1620221953175 | ACTIVE | | subapp
在第二个日志实例中,这两个值是相同的。我需要过滤掉它们,即我只需要使用不匹配的值。 如何比较这两个不匹配的值并打印新的MSISDN?