[net.bugs.4bsd] ps -gaux | fgrep -v root

wws@siemens.UUCP (William W Smith) (07/06/84)

The command `ps -gaux | fgrep -v root` displays lines that contain the
word root as the user id of the process, but with the beginning of the line 
deleted so that the word root does not show.   Other forms of the ps command 
with other patterns that match at the beginning of the output lines from ps 
will also cause this behavior.

I was able to interpose `tee file` into the middle of the pipeline with
the same behavior resulting so as to see what fgrep was getting as input.
Separating the process into `ps -gaux >foo` ; `cat foo | fgrep ...` does
not cause the anomalous behavior.

This has happened on both 4.1 and 4.2 versions of Berkeley UNIX.

Bill Smith
princeton!siemens!wws