Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Aug 2001 18:32:41 +0300 
From:      Yonatan Bokovza <Yonatan@xpert.com>
To:        'Daniel Frazier' <dfrazier@magpage.com>, Brendan McAlpine <bmcalpine@macconnect.com>
Cc:        freebsd-questions <freebsd-questions@FreeBSD.ORG>
Subject:   RE: Scripting question
Message-ID:  <EB513E68D3F5D41191CA00025558810150D5EA@mailserv.xpert.com>

next in thread | raw e-mail | index | archive | help
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EB513E68D3F5D41191CA00025558810150D5EA>