- 论坛徽章:
- 0
|
请教一下,我想把下面的文本:- 4 [192.168.9.11:5452:153, 192.168.9.11:5000:77, 192.168.9.11:4888:154]
- 3 [192.168.9.12:5452:171, 192.168.9.11:5000:85]
- 2 [192.168.9.13:5452:153, 192.168.9.11:5000:77, 192.168.9.11:4888:154]
- 1 [192.168.9.14:5452:96, 192.168.9.11:5000:96, 192.168.9.11:4888:192]
复制代码 处理成这样的格式:- 4 [192.168.9.11:5452:PORT, 192.168.9.11:5000:PORT, 192.168.9.11:4888:PORT]
- 3 [192.168.9.12:5452:PORT, 192.168.9.11:5000:PORT]
- 2 [192.168.9.13:5452:PORT, 192.168.9.11:5000:PORT, 192.168.9.11:4888:PORT]
- 1 [192.168.9.14:5452:PORT, 192.168.9.11:5000:PORT, 192.168.9.11:4888:PORT]
复制代码 我尝试用sed解决,没搞定,请各位大侠支招,多谢
|
|