批处理:- for /f "eol=- tokens=1 delims= " %%i in (result.txt) do echo %%i>>s1.txt
复制代码 Result.txt文件内容:- -------------------------------------------------------------------------------
- Performing Time: 1/21/2018 7:57:42 --> Normal Scan: About To Scan 389120 IP Using 1024 Threads
- -------------------------------------------------------------------------------
- Performing Time: 1/21/2018 7:58:29 --> Normal Scan: About To Scan 389120 IP Using 1024 Threads
- 172.87.192.0 6379 Open
- 172.87.192.4 6379 Open
- 172.87.192.1 6379 Open
- 172.87.192.3 6379 Open
- 172.87.192.6 6379 Open
- 172.87.192.2 6379 Open
- 172.87.192.5 6379 Open
- 172.87.192.7 6379 Open
- 172.87.192.9 6379 Open
- 172.87.192.10 6379 Open
- 172.87.192.8 6379 Open
复制代码 最后得到的s1.txt- Performing
- Performing
- 172.87.192.0
- 172.87.192.4
- 172.87.192.1
- 172.87.192.3
- 172.87.192.6
- 172.87.192.2
- 172.87.192.5
- 172.87.192.7
- 172.87.192.9
- 172.87.192.10
- 172.87.192.8
复制代码 我想了解的问题:
eol=- 这里只将带 - 的行内容全部去除,但是没有发现其他哪一点还可以同时去除: 1/21/2018 7:57:42 --> Normal Scan: About To Scan 389120 IP Using 1024 Threads
以及去除每一行的 6379 Open |