Estou tentando grepo andamento taildo log de arquivo e obtemos a npalavra th de uma linha. Arquivo de exemplo:
$ 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
Agora, se eu fizer um 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
Se eu grepque tail:
$ tail -f test.txt | grep Beam
Beam goes blah
Beam goes what?
Beam goes okay
Beam goes bye
^C
Mas se eu awkque grep:
$ tail -f test.txt | grep Beam | awk '{print $3}'
Nada, não importa quanto tempo eu espero. Suspeito que tenha algo a ver com a maneira como o fluxo funciona.
Alguém tem alguma pista?