在 PowerShell 中使用以下Select-String
命令:
Select-String -Path E:\Documents\combined0.txt -Pattern "GET /ccsetup\.exe" -AllMatches > E:\Documents\combined3.txt
创建一个输出文件,每行以路径和文件名开头,后跟一个冒号。例如:
E:\Documents\combined0.txt:255:255.255.255 - - [31/Dec/2014:04:15:16 -0800] "GET /ccsetup.exe HTTP/1.1" 301 451 "-" "Mozilla/5.0 (compatible; SearchmetricsBot; http://www.xxxx.com/en/xxxx-bot/)"
如何去掉结果中的输出文件路径名、输出文件名和冒号?