On Tue, Jun 06, 2000 at 09:06:24PM -0700, [EMAIL PROTECTED] wrote:
> Then the cron entry:
> 1 0 1 1-12 * $HOME/mailbackup
>
> do i need to put in /home/user/mailbackup or does $HOME fulfill bash
> within cron recipe?
According to the crontab(5) man page (Red Hat Linux 5.1),
Several environment variables are set up automatically by
the cron(8) daemon. SHELL is set to /bin/sh, and LOGNAME
and HOME are set from the /etc/passwd line of the
crontab's owner. HOME and SHELL may be overridden by set-
tings in the crontab; LOGNAME may not.
So $HOME should work.
> I would like to filter out, however, the new mail in June. They are
> standard mbox files... How would I go about this?
I've never done this, but the standard solution to these problems seems
to be to use procmail along with formail. Check out their man pages.
(And hope someone more knowledgeable than me chimes in here. B-)
Something else you could try would be grepmail. You can get it from
freshmeat.net. Then something like this
grepmail '^Date: .* Jun' yourmailbox > mail-for-Jun
grepmail -v '^Date: .* Jun' yourmailbox > mail-tmp
mv mail-tmp yourmailbox
(which I have not tested) might do what you want, where the month could
be determined each month using date as you've already done.
--
Gary Johnson | Agilent Technologies
[EMAIL PROTECTED] | RF Communications Product Generation Unit
| Spokane, Washington, USA