1

I am using ngrep to filter some tcp packetes into STDOUT Since it now become more important to log the output (after changing the result a bit usingsed) into a file.

piping it with sed looks OK in stdout - But no content is written when writing to dump.log

Below is the command:

grep -l -q -W none -i "^POST /somefile.php" tcp and port 80 | sed -e 's/^T/IP/g' >> dump.log

Having the impression that either sed or ngrep blocks the process of pushing the content.

Ole K
  • 754
  • 1
  • 9
  • 32

1 Answers1

1

Add -U to GNU sed to load minimal amounts of data from the input and flush the output buffers more often.

Cyrus
  • 84,225
  • 14
  • 89
  • 153