1
.. Script Run Complete. You have new mail in /var/spool/mail/<user-name> -bash-3.2$ 

I have seen the above message most the times on my prompt, probably while it's idle or as soon as script returns or just upon hitting return. I won't be needing it, at all.

Is there any way/tweak to control whats being output on the prompt? How would I be knowing if it's going to show up there?

1 Answer 1

1

You have to do unset MAILCHECK. From the bash manual:

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. 

You can e.g. put it at the end of the your /.bashrc or search that file and/or /etc/bash.bashrc if MAILCHECK is set anywhere and remove it.

The alternative is that you read the mail and make sure no new mail arrives...

1
  • @Keys Which part of "From the bash manual" did you miss? Commented Feb 26, 2015 at 10:26

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.