Estoy tratando de grepcontinuar con tailel registro de archivos y obtener la npalabra th de una línea. Archivo de ejemplo:
$ cat > test.txt <<EOL
Beam goes blah
John goes hey
Beam goes what?
John goes forget it
Beam goes okay
Beam goes bye
EOL
^C
Ahora si hago un tail:
$ tail -f test.txt
Beam goes blah
John goes hey
Beam goes what?
John goes forget it
Beam goes okay
Beam goes bye
^C
Si yo grepeso tail:
$ tail -f test.txt | grep Beam
Beam goes blah
Beam goes what?
Beam goes okay
Beam goes bye
^C
Pero si yo awkeso grep:
$ tail -f test.txt | grep Beam | awk '{print $3}'
Nada, no importa cuánto tiempo espere. Sospecho que tiene algo que ver con la forma en que funciona la transmisión.
Alguien tiene alguna pista?
