Date: Wed, 7 Jan 1998 09:04:07 +1030 From: Greg Lehey <grog@lemis.com> To: "Steven Fletcher (Shellnet IRC administrator)" <ircadmin@shellnet.co.uk> Cc: Kwoody <kwoody@citytel.net>, freebsd-questions <freebsd-questions@FreeBSD.ORG> Subject: Re: mail log to myself Message-ID: <19980107090407.59327@lemis.com> In-Reply-To: <98010611012341500@mailhost.shellnet.co.uk>; from Steven Fletcher (Shellnet IRC administrator) on Tue, Jan 06, 1998 at 11:01:56AM -0000 References: <Pine.BSF.3.91.980105114740.1822A-100000@mybsd.net> <98010611012341500@mailhost.shellnet.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 06, 1998 at 11:01:56AM -0000, Steven Fletcher (Shellnet IRC administrator) wrote: >> >> I have a little cron job that creates a log at night. How can one mail >> said log to myself? Its not big only about 300 bytes. > > A simple way would be to do the following: > > cat <mail log file> | mail -s "Mail logs" <your email address> > > As an example: > > cat /var/log/maillog | mail -s "Mail logs" kwoody@whatever.com You almost never need to use cat to pipe a single file into another program. These examples could be simplified to (second example): $ mail < /var/log/maillog -s "Mail logs" kwoody@whatever.com Greg
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980107090407.59327>