DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

mailcheck(1)


mailcheck -- check for mail

Synopsis

mailcheck

Description

mailcheck checks for the existence of mail. Whenever it finds some, it prints the You have mail message on standard output.

If there is no mail, it prints No mail on standard error.

mailcheck is commonly used in a user's $HOME/.profile as follows:

   mailcheck 2>/dev/null
This prints a message when there is mail, and is otherwise silent.

Files


/etc/default/mail
mail inbox location information

Exit codes


0
mail exists

1
no mail

2
some other error

References

mailintro(1)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004