HAVE_MAIL(SIPB) UNIX Programmer's Manual HAVE_MAIL(SIPB) NAME have_mail - tell whether a user has mail SYNOPSYS have_mail [user_name] DESCRIPTION Checks for a file in /usr/spool/mail beloning to the speci- fied user (defaulting to the user invoking the command) and determines whether the file is non-empty. This is similar to the mechanism by which _l_o_g_i_n finds out if a user has mail. If the output is not directed to a terminal, the value is returned as 0 or 1, so that "`_h_a_v_e__m_a_i_l`" may be used in a shell script, i.e., "if (`_h_a_v_e__m_a_i_l`) then inc". Otherwise, it is in the format "You have mail." or "User spook has mail." FILES /usr/spool/mail/* AUTHOR Ken Raeburn (spook@athena) BUGS When executed as a remote shell, the short form of the out- put is invoked. It should be made a control argument. MIT SIPB 1 31 Aug 85