I run a TACACS+ server which sends debug information to
stderr. As I would like to grep specific data from this debug information, I redirected
tac_plus -f /usr/local/etc/tac_plus.cfg 2>&1. However, looks like it actually did not go to
stdout, because if I execute
tac_plus -f /usr/local/etc/tac_plus.cfg 2>&1 | cat, then I see no output at all. On the other hand,
( echo blah >&2 ) 2>&1 | tr 'a-z' 'A-Z' works as expected:
$ ( echo blah >&2 ) 2>&1 | tr 'a-z' 'A-Z' BLAH $
Could somebody explain this behavior? Shell is bash version 4.2.37.