Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've recently moved from Ubuntu to OS X and I'm finding that the 'tail' command behaves differently.

On Ubuntu I could run

tail -f xyzzy.log | espeak

(To have the computer read me what's happening on IRC, for example.)

However on OS X

tail -F xyzzy.log | say

(which I expected to be equivalent) produces no result.

Presumably this is because the pipe wants to send the complete output of tail to say, but since tail is running constantly (with -f) it never reaches the end of the process and so the output never gets passed to say. Honestly, if I'm understanding this right, this behaviour makes more sense than the behaviour I had on Ubuntu -- it's just less useful.

So is there another way I can achieve the same result? (And are my presumptions about why this is happening correct?)

share|improve this question
up vote 4 down vote accepted

See which suggests

 tail -f xyzzy.log | while read line ; do echo $line | say ; done
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .