1

For some unfathomable reason, the pipe command breaks (and in a weird way too) when I use it in Terminal. Simply put, any command placed after the | will result in  zsh: command not found:  grep (grep being an example, but afaik any command will yield the same result). I checked the path and the necessary directories are in there. As a matter of fact, which grep yields the expected /usr/bin/grep, so zsh knows where to look. I tried bash as well but the answer stays the same. Any idea?

1 Answer 1

2

In the error message you included in your question, there seem to be two spaces between : and grep. This indicates that you still have the special key pressed you needed to get | when you press Space. Try to make sure that you release the key before pressing Space (or omit space altogether, it's syntactically not required).

1
  • Wow. You do have a keen eye. Indeed that was it (and I feel so stupid). My finger must have stayed on the alt key a tad too long (or I'm typing too fast), repeatedly. Thanks a lot. Commented Jan 4, 2023 at 8:05

You must log in to answer this question.

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