Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: mailx utility in Unix
Hi Alex!
Thanks for your support. It worked fine.
Shakeel Qureshi
squreshi_at_barpoint.com
--- "Afanassiev, Alex"
<Alex.Afanassiev_at_team.telstra.com> wrote:
> Hi Shakeel Qureshi
>
> Here is an example:
>
> #!/bin/ksh
> #
> SUBJECT="Example"
> TO=msklq_at_yahoo.com
> SPOOL=/tmp/fifo$$.txt
> sqlplus -s / > $SPOOL << EOF
> set echo off feedback off verify off
> set serveroutput on lines 132 pages 0 head off
> escape on
> select table_name from dba_tables;
> quit
> EOF
> unix2dos $SPOOL $SPOOL 2>/dev/null
> /usr/bin/mailx -s "${SUBJECT}" ${TO} << EOF
> ~< !echo
> ~< !uuencode $SPOOL `basename $SPOOL`
> ~< !echo
> EOF
>
>
> With regards
> Alex Afanassiev
> Oracle DBA, TOC OPS/Internet.Operations
> Tel: (03) 8 661 20 61
> Fax: (03) 9 650 36 74
>
>
> > -----Original Message-----
> > From: Shakeel Qureshi [SMTP:msklq_at_yahoo.com]
> > Sent: Wednesday, January 03, 2001 8:46 AM
> > To: Multiple recipients of list ORACLE-L
> > Subject: mailx utility in Unix
> >
> > Hi Gurus!
> >
> > I am using mailx utility to send output of a spool
> > file.
> >
> > Is there any way to mailx the output file as an
> > attachemnt instead of whole contents.
> >
> > I know it is not going to be easy, but I think, it
> is
> > possible.
> >
> > Appreciate if anyone have any idea as to how to do
> it.
> >
> > Thanks,
> >
> > Shakeel Qureshi
> > squreshi_at_barpoint.com
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Photos - Share your holiday photos online!
> > http://photos.yahoo.com/
> > --
> > Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> > --
> > Author: Shakeel Qureshi
> > INET: msklq_at_yahoo.com
> >
> > Fat City Network Services -- (858) 538-5051
> FAX: (858) 538-5051
> > San Diego, California -- Public Internet
> access / Mailing Lists
> >
>