bash: command not found after piping
Hi,
I'm trying something quite commonly found in an Unix environment, namely piping the output of one command into the input of a subsequent one, eg.
bash$ ps ax | grep -i bash
But unfortunately I'm receiving--and now comes the most curious part--most of the times (not always!!) an error message
bash: grep: command not found
When calling grep directly
bash$ grep
the resulting output is
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
"which"-ing the commands
bash$ which bash ps grep
results in
/bin/bash
/bin/ps
/usr/bin/grep
Cheers,
MMHein
Mac mini, Mac OS X (10.7)