有时OSX中的Bash管道会提示找不到命令 [英] Bash piping in OSX prompts command not found, sometimes
本文介绍了有时OSX中的Bash管道会提示找不到命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在OSX终端中:
du -h | sort -nr
-bash: sort: command not found
which sort
/usr/bin/sort
奇怪的是:我尝试重现该错误,而且似乎完全是随机的.我的PATH回响:
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
这仅在配管时发生,并与grep
,more
,less
等一起发生.
知道是什么原因造成的吗?
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.
这篇关于有时OSX中的Bash管道会提示找不到命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文