Sto cercando di grepcontinuare tailil registro dei file e ottenere la nparola th da una riga. File di esempio:
$ 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
Ora se faccio 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
Se io grepquello tail:
$ tail -f test.txt | grep Beam
Beam goes blah
Beam goes what?
Beam goes okay
Beam goes bye
^C
Ma se io awkquello grep:
$ tail -f test.txt | grep Beam | awk '{print $3}'
Niente, non importa quanto tempo aspetto. Sospetto che abbia a che fare con il modo in cui funziona il flusso.
Qualcuno ha qualche idea?