0

I have a tail that makes a site in an external file:

tail -f LOG.TXT | grep ';HI(<[0-9][0-9]><[0-9]>' | sed -u -f seds.dat |awk '{ print $1, $2, $5 = "HELLO =", $6, $7, $8, $9 } ' |grep -v '>'

I believe that the tail does not work because the delay to perform sed in seds.dat

Using CAT it takes a while but returns the information.

I would like to make it update the rows with tail?

Espector
  • 431
  • 2
  • 5
  • 17
  • 1
    so you say `tail | grep | sed | awk | grep`. Uhms, are you aware that this can probably squeezed into a single `awk` command? – fedorqui Aug 23 '16 at 08:48
  • could you provide sample LOG.TXT; – Mustafa DOGRU Aug 23 '16 at 09:03
  • The log.txt is another machine mount point, I think talves this is one of the reasons. – Espector Aug 23 '16 at 09:07
  • It's buffering, see http://stackoverflow.com/questions/5427483/why-no-output-is-shown-when-using-grep-twice. If you post a [mcve] including concise, testable sample input and expected output I expect someone can help you. – Ed Morton Aug 23 '16 at 15:26

1 Answers1

0

The use of tail -f LOG.TXT means that the tail will not finish when it reaches the end of file. It will wait for more data to be written to LOG.TXT. I imagine this is why you think it is not working.

Steven Shaw
  • 6,063
  • 3
  • 33
  • 44