Bash piping in OSX prompts command not found, sometimes
In the OSX terminal : du -h | sort -nr -bash: sort: command not found which sort /usr/bin/sort The weird thing is: I tried reproducing the error and it seems to be totally random. My PATH echoed: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/usr/texbin:/Users/sytycs/.rvm/bin This only occurs when piping and happens with grep , more , less etc. Any idea what is causing this? That space is not a space. Erase and replace it. Michael Trojanek This likely happens because you use a keyboard layout with a non-US layout (happened to me too). On German layouts, the pipe