Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 ngrep 将一些 tcp 数据包过滤到 STDOUT 中,因为现在将输出(在使用 更改结果之后sed)记录到文件中变得更加重要。
sed
在标准输出中看起来不错的管道sed- 但是写入时没有写入内容dump.log
dump.log
下面是命令:
grep -l -q -W none -i "^POST /somefile.php" tcp and port 80 | sed -e 's/^T/IP/g' >> dump.log
给人的印象是 sed 或 ngrep 会阻止推送内容的过程。
添加-U到 GNU sed 以从输入加载最少量的数据并更频繁地刷新输出缓冲区。
-U