From owner-freebsd-questions Sat May 12 11:43:33 2001 Delivered-To: freebsd-questions@freebsd.org Received: from dt051n37.san.rr.com (dt051n37.san.rr.com [204.210.32.55]) by hub.freebsd.org (Postfix) with ESMTP id 8C92E37B423 for ; Sat, 12 May 2001 11:43:30 -0700 (PDT) (envelope-from DougB@DougBarton.net) Received: from DougBarton.net (master [10.0.0.2]) by dt051n37.san.rr.com (8.9.3/8.9.3) with ESMTP id LAA61650; Sat, 12 May 2001 11:43:10 -0700 (PDT) (envelope-from DougB@DougBarton.net) Message-ID: <3AFD843E.4F10E5E5@DougBarton.net> Date: Sat, 12 May 2001 11:43:10 -0700 From: Doug Barton Organization: Triborough Bridge & Tunnel Authority X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Doug Young Cc: "G. Jason Middleton" , freebsd-questions@FreeBSD.ORG Subject: Re: how to email logs files References: <00ba01c0daf5$55512d80$0300a8c0@oracle> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Doug Young wrote: > To get a daily email of ppp.log, insert the following line in > "/etc/crontab" > > 30 1 * * * root cat /var/log/ppp.log | mail -s "nightly" > user@your_isp.com This is the second most useless use of cat. In general, anything you can do: cat foo | bar with you can also do: bar < foo with. It is definitely true in the case of 'mail'. Good luck, Doug PS, the prototypical useless use of cat is, 'cat file | more' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message