У меня есть файл loge, у которого есть строки, строка ниже для него - У меня есть 2 ключа. Первый ключ - под. Id (1112222222) второй ключ - идентификатор сеанса (xxx.apn.com; 2418561818; 846; 60034).Необходима команда grep awk
Подтверждающий идентификатор, мне нужно создать большую команду оболочки для поиска идентификатора сеанса этого поддиректа, а затем выполнить поиск в файле для всех строк, имеющих один из этих ключей или оба из них. Например, строка ниже содержит идентификатор сеанса и пару поддерева.
úú 3 [ +548] EPC_Log: bi_tspSequenceId=1; i_tspSeverity=6; vc_MessageInformation=CCR received. SessionId: xxx.apn.com;2418561818;846;60034, SubsId: 1112222222, IpAddr: 1.1.1.1, Protocol: Gx, RequestType: Create, APN: apn.com, Event-Trigger: ;i_Priority=6úúûû TelORB: Tue Aug 11 12:26:05 2015, Host:úú Tue Aug 11 12:26:18 2015
Ввод Ex.
úú 3 [ +548] EPC_Log: bi_tspSequenceId=1; i_tspSeverity=6; vc_MessageInformation=CCR received. SessionId: xxx.apn.com;2418561818;846;60034, SubsId: 1112222222, IpAddr: 1.1.1.1, Protocol: Gx, RequestType: Create, APN: apn.com, Event-Trigger: ;i_Priority=6úúûû TelORB: Tue Aug 11 12:26:05 2015, Host:úú Tue Aug 11 12:26:18 2015
úú 3 [ +548] EPC_Log: bi_tspSequenceId=1; i_tspSeverity=6; vc_MessageInformation=CCA received. SessionId: xxx.apn.com;2418561818;846;60034, SubsId: 1112222222, IpAddr: 1.1.1.1, Protocol: Gx, RequestType: Create, APN: apn.com, Event-Trigger: ;i_Priority=6úúûû TelORB: Tue Aug 11 12:26:05 2015, Host:úú Tue Aug 11 12:26:18 2015
úú 3 [ +548] EPC_Log: bi_tspSequenceId=1; i_tspSeverity=6; vc_MessageInformation=CCR received. SessionId: yyy.apn.com;2418561818;846;60034, SubsId: 1113333333, IpAddr: 1.1.1.1, Protocol: Gx, RequestType: Create, APN: apn.com, Event-Trigger: ;i_Priority=6úúûû TelORB: Tue Aug 11 12:26:05 2015, Host:úú Tue Aug 11 12:26:18 2015
úú 3 [ +548] EPC_Log: bi_tspSequenceId=1; i_tspSeverity=6; vc_MessageInformation=CCA received. SessionId: yyy.apn.com;2418561818;846;60034, SubsId: 1112222222, IpAddr: 1.1.1.1, Protocol: Gx, RequestType: Create, APN: apn.com, Event-Trigger: ;i_Priority=6úúûû TelORB: Tue Aug 11 12:26:05 2015, Host:úú Tue Aug 11 12:26:18 2015
Выход Ex.
úú 3 [ +548] EPC_Log: bi_tspSequenceId=1; i_tspSeverity=6; vc_MessageInformation=CCR received. SessionId: xxx.apn.com;2418561818;846;60034, SubsId: 1112222222, IpAddr: 1.1.1.1, Protocol: Gx, RequestType: Create, APN: apn.com, Event-Trigger: ;i_Priority=6úúûû TelORB: Tue Aug 11 12:26:05 2015, Host:úú Tue Aug 11 12:26:18 2015
úú 3 [ +548] EPC_Log: bi_tspSequenceId=1; i_tspSeverity=6; vc_MessageInformation=CCA received. SessionId: xxx.apn.com;2418561818;846;60034, SubsId: 1112222222, IpAddr: 1.1.1.1, Protocol: Gx, RequestType: Create, APN: apn.com, Event-Trigger: ;i_Priority=6úúûû TelORB: Tue Aug 11 12:26:05 2015, Host:úú Tue Aug 11 12:26:18 2015
úú 3 [ +548] EPC_Log: bi_tspSequenceId=1; i_tspSeverity=6; vc_MessageInformation=CCA received. SessionId: yyy.apn.com;2418561818;846;60034, SubsId: 1112222222, IpAddr: 1.1.1.1, Protocol: Gx, RequestType: Create, APN: apn.com, Event-Trigger: ;i_Priority=6úúûû TelORB: Tue Aug 11 12:26:05 2015, Host:úú Tue Aug 11 12:26:18 2015
Обратите внимание на [edit-help] (http://stackoverflow.com/editing-help). – Cyrus
, пожалуйста, укажите образцы входных данных и соответствующие выходные данные для этого –
. Вы можете проверить это в теле после обновления с помощью образцов –