Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: mailx utility in Unix

RE: mailx utility in Unix

From: Afanassiev, Alex <Alex.Afanassiev_at_team.telstra.com>
Date: Wed, 3 Jan 2001 09:42:15 +1100
Message-Id: <10729.125559@fatcity.com>


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
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
Received on Tue Jan 02 2001 - 16:42:15 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US