From owner-freebsd-questions Thu Aug 9 8:33:18 2001 Delivered-To: freebsd-questions@freebsd.org Received: from void.xpert.com (xpert.com [199.203.132.1]) by hub.freebsd.org (Postfix) with ESMTP id F139E37B401 for ; Thu, 9 Aug 2001 08:33:13 -0700 (PDT) (envelope-from Yonatan@xpert.com) Received: from mailserv.xpert.com ([199.203.132.135]) by void.xpert.com with esmtp (Exim 3.20 #1) id 15UrnK-0007Rz-00; Thu, 09 Aug 2001 18:32:22 +0300 Received: by mailserv.xpert.com with Internet Mail Service (5.5.2650.21) id ; Thu, 9 Aug 2001 18:32:48 +0300 Message-ID: From: Yonatan Bokovza To: 'Daniel Frazier' , Brendan McAlpine Cc: freebsd-questions Subject: RE: Scripting question Date: Thu, 9 Aug 2001 18:32:41 +0300 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Brendan McAlpine wrote: > > Hey all > > > > I am trying to cobble together a script that emails me a > file. How would I > > write this in a one line shell script command? I am using > the mail command. > > I can get the shell to open a new mail message, but I can't > get it to put > > the contents of the file in the email and send it off to > me. Any help would > > be appreciated. > > > > mail -s "subject" recipient@somedomain.com < filename > or, if the file you want to send is binary you'll need: uuencode filename filename | mail -s "subject" recipient@somedomain.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message