..
Script Run Complete.
You have new mail in /var/spool/mail/<user-name>
-bash-3.2$
我经常在提示符下看到以上消息,可能是在其空闲时,在脚本返回时或在按回车键时看到的。我根本不需要它。
有什么方法/调整可以控制在提示上输出的内容吗?我怎么知道它是否会出现在那?
你必须做unset MAILCHECK
。从bash手册中:
MAILCHECK Specifies how often (in seconds) bash checks for mail. The default is 60 seconds. When it is time to check for mail, the shell does so before displaying the primary prompt. If this variable is unset, or set to a value that is not a number greater than or equal to zero, the shell disables mail checking.
您可以例如将其放在您的/.bashrc
文件末尾,或者搜索该文件和/或/etc/bash.bashrc
是否在任何位置设置了MAILCHECK并将其删除。
另一种方法是您阅读邮件,并确保没有新邮件到达...
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句