Artificial intelligent assistant

Piping from grep to awk not working I am trying to `grep` the ongoing `tail` of file log and get the `n`th word from a line. Example file: $ 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 Now if I do a `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 If I `grep` that `tail`: $ tail -f test.txt | grep Beam Beam goes blah Beam goes what? Beam goes okay Beam goes bye ^C But if I `awk` that `grep`: $ tail -f test.txt | grep Beam | awk '{print $3}' Nothing no matter how long I wait. I suspect it's something to do with the way the stream works. Anyone have any clue?

It's probably output buffering from grep. you can disable that with `grep --line-buffered`.

But you don't need to pipe output from grep into awk. awk can do regexp pattern matching all by itself.

`tail -f test.txt | awk '/Beam/ {print $3}'`

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 8d35cc3bf337003812f3617cc06a5d35