as I can create a job that the mail checks me that arrives and it creates me a new file with the new mail.
I want create a shell. But i don't know well Unix.
thanks
max
[Edited by mmistero on 05-11-2001 at 10:13 AM]
mib
May 11, 2001, 7:37am
2
If you are using bash you don't need a outside script. You can set the env var "MAILPATH".
From the bash man:
MAILPATH
A colon-separated list of file names to be checked for mail. The message to be printed when mail arrives in a particular file may be specified by separating the file name from the message with a `?'. When used in the text of the message, $_ expands to the name of the current mailfile. Example: MAILPATH='/usr/spool/mail/bfox?"You have mail":~/shell-mail?"$_ has mail!"' Bash supplies a default value for this variable, but the location of the user mail files that it uses is system dependent (e.g., /usr/spool/mail/$USER).
For each user you can do something like:
export MAILPATH="${HOME}/Mailbox?New mail has arrvied in \$_"
You can also set the env var MAILCHECK to the number of seconds between mail checks.
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, the shell disables mail checking.
HTH
You could write the code of the shell that I have to create for saving me the new mails in new lines to me