在OSX终端中:
du -h | sort -nr
-bash: sort: command not found
which sort
/usr/bin/sort
Run Code Online (Sandbox Code Playgroud)
奇怪的是:我尝试重现错误,它似乎是完全随机的.我的PATH回应道:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/usr/texbin:/Users/sytycs/.rvm/bin
Run Code Online (Sandbox Code Playgroud)
这种情况只发生在管道与发生grep,more,less等任何想法是什么原因造成的?