-2
我需要解析日誌文件,例如重複:擊解析器和找到狀態
151.67.79.39/mnt3/WkJWwe3eYp/2w8PNGLrBh/158
95.245.46.253/storage1/FV3QLXuaDG/PlfwC4BtV9/254
151.75.214.206/storage1/DeOq0ej9B2/fr48SLpuri/80
87.17.174.236/storage1/IDtx9c2p7i/VwTNiwHAJF/255
87.17.174.236/storage1/IDtx9c2p7i/VwTNiwHAJF/255
87.17.174.118/storage1/IDtx9c2p7i/VwTNiwHAJF/255
87.17.174.236/storage1/IDtx9c2p7i/VwTNiwHAJF/255
87.161.130.61/storage1/IDtx9c2p7i/VwTNiwHAJF/255
62.43.164.247/storage1/eDoT6fI4vp/76GwaRzJCL/31
93.229.17.99/mnt3/uQi9iiyMZA/G83FZV2zCB/160
151.75.214.206/storage1/DeOq0ej9B2/fr48SLpuri/80
93.40.125.31/storage1/4mN9uJGwA2/0uOM39Gx8g/10
95.245.46.253/storage1/FV3QLXuaDG/PlfwC4BtV9/254
151.75.214.206/storage1/DeOq0ej9B2/fr48SLpuri/80
87.17.174.236/storage1/IDtx9c2p7i/VwTNiwHAJF/255
151.75.214.206/storage1/DeOq0ej9B2/fr48SLpuri/80
95.245.46.253/storage1/FV3QLXuaDG/PlfwC4BtV9/254
151.75.214.206/storage1/DeOq0ej9B2/fr48SLpuri/80
94.38.149.210/storage1/RXhISkEsOw/AHwro83Lyp/97
95.245.46.253/storage1/FV3QLXuaDG/PlfwC4BtV9/254
151.75.214.206/storage1/DeOq0ej9B2/fr48SLpuri/80
95.245.46.253/storage1/FV3QLXuaDG/PlfwC4BtV9/254
151.75.214.206/storage1/DeOq0ej9B2/fr48SLpuri/80
...
[IP]/[ITEM1]/[ITEM2]/[ITEM3]/[ITEM4]
我需要找到所有具有相同ITEM2的IP。 任何想法? 謝謝:)
感謝您的回答karakfa。你能告訴我如何只有所有ITEM2具有不同的IP(沒有重複)嗎? –
例如:在我的示例日誌中,只有ITEM2「IDtx9c2p7i」具有多個不同的IP,因此我只想獲得:87.17.174.236/IDtx9c2p7i,87.17.174.118/IDtx9c2p7i/,87.17.174.236/IDtx9c2p7i/,87.161.130.61/ IDtx9c2p7i/ –
請參閱更新。 – karakfa