I am running on AIX V5.1. The 'oslevel -r' command shows 5100-05.
I just downloaded (from http://www.ibm.com/servers/aix/products/aixos/linux/download.html\) and installed the expect package and its pre-reqs:
expect-5.34-8
tk-8.3.3-8
tcl-8.3.3-8
I then attempted to implement the suggestion at http://www.mail-archive.com/bug-textutils@gnu.org/msg00553.html to use expect's unbuffer with grep. If I run the command 'tail -f /tmp/abcdef.log | grep abcdef' on an unprivileged (non-root) userid, I see output from grep. If I run the command 'tail -f /tmp/abcdef.log | grep abcdef' on the same userid, I do not see any output. So unbuffer seems to be making the situation worse by not showing output that grep otherwise produces.
I therefore conclude that unbuffer is not working as intended.
The command 'unbuffer cat /tmp/abcdef.log' does display the file:
abcdef
ghijkl
abcdef
I see the same behavior:
$ tail -f /tmp/abcdef.log |grep abcdef
abcdef
abcdef
^C$ tail -f /tmp/abcdef.log |grep abcdef |grep abcdef
^C$ tail -f /tmp/abcdef.log |unbuffer grep abcdef |grep abcdef
^C$ cat /tmp/abcdef.log
abcdef
ghijkl
abcdef
$
Because of the "-f" of course, I had to ctrl-C to stop each.
I tried it on a Linux system and got the same result.
(It had expect-5.38.0, a slightly newer version). It does
seem to be a bug in unbuffer, given the description.
Actually the manpage says to use it on every command in the
pipeline except the last one, but that gave the same result.
You might try the newsgroup "comp.lang.tcl", which is where
the expect website says to go for help. If someone has an
answer or a fix, we can try to get it added to our image.