I'm having the weirdest problem on my new MacBook pro, I had the same on the old one and I thought it might have something to do with that.
On my old MacBook Pro, whenever I used the pipe char in my Terminal followed by, let's say,
grep I'd get a
command not found. If I then just typed
grep in plain in the Terminal I'd get the standard output.
Later I discovered that the problem only occurred when I typed in the command fast:
Lets say I wanted to use
tee to inherit something in a few text files. From another Terminal I'd do:
echo "-r base.txt" | tee -a development.txt texting.txt production.txt
I know this command and I'm able to type it all in ~3 seconds. It gives me:
-bash: tee: command not found
Now if I try the exact same command but really take my time typing it, lets say I use 20 seconds on typing it, then I get:
This is a confirmation that the command was executed properly.
I believed something was wrong with my old MacBook. Four months ago when I bought a new Mac it was exactly the same.
I then tried to do a fresh install. I deleted the hard drive and installed macOS from scratch. The same thing still occurs.
Has anyone else experienced this problem? If so, do you have a fix?
I also tried to install another Terminal like iTerminal2, I think that's what it's called, but with the exact same problem