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: Unix output formatting

Re: Unix output formatting

From: Jared Still <jkstill_at_gmail.com>
Date: Tue, 21 Mar 2006 07:00:19 -0800
Message-ID: <bf46380603210700m8ef612fxa2e188da0860b714@mail.gmail.com>


Actually, Ron's advice was correct.

The echo command varies a bit from shell to shell and flavor of unix. There is an 'echo' built into the shell, and a standalone command.

Proper use of the echo command in your script would make the difference.

Jared

On 3/21/06, Stankus, Paula <stankup_at_doacs.state.fl.us> wrote:
>
> Thanks Sinardy. That was much more helpful. J I am trying to open
> directly from Microsoft Outlook as I use mailx to send it.
>
>
>
> J
>
>
>
> -----Original Message-----
> *From:* Sinardy Xing [mailto:oracle.rdbms_at_gmail.com]
> *Sent:* Monday, March 20, 2006 9:53 PM
> *To:* Ron.Reidy_at_arraybiopharma.com
> *Cc:* Stankus, Paula; ORACLE-L_at_freelists.org
> *Subject:* Re: Unix output formatting
>
>
>
>
>
> On 3/21/06, *Reidy, Ron* <Ron.Reidy_at_arraybiopharma.com> wrote:
>
> man echo
>
> -----Original Message-----
> *From:* oracle-l-bounce_at_freelists.org [mailto:
> oracle-l-bounce_at_freelists.org] *On Behalf Of *Stankus, Paula
> *Sent:* Monday, March 20, 2006 2:40 PM
> *To:* ORACLE-L_at_freelists.org
> *Subject:* RE: Unix output formatting
>
> I have a script that does the following:
>
>
>
> ###########################################################
>
> echo "EXPORT FOR $DBNAME" > $LOGFILE
>
> echo "----------------------------------------------------" >> $LOGFILE
>
> echo Todays date is ......................: $DATESTR >> $LOGFILE
>
> echo The Log File for Today is ...........: $LOGFILE >> $LOGFILE
>
> echo The Path for Oracle Home is .........: $ORACLE_HOME >> $LOGFILE
>
> #echo The Oracle Sid is ...................: $ORACLE_SID >> $LOGFILE
>
> echo "\n"
>
> echo The hostname is .....................: $HNAME >> $LOGFILE
>
> echo "\n"
>
> echo The DBNAME is .......................: $DBNAME >> $LOGFILE
>
> echo "----------------------------------------------------" >> $LOGFILE
>
> echo Begin the export process at .........: `date` >> $LOGFILE
>
> echo
>
>
>
> The output in Unix lines up nicely:
>
>
>
> EXPORT FOR remedy
>
> ----------------------------------------------------
>
> Todays date is ......................: 20060320
>
> The Log File for Today is ...........:
> /backup/exports/remedy_export.log_2006032
>
> 0
>
> The Path for Oracle Home is .........: /oracle/app/oracle/product/10.2.0
>
> The hostname is .....................: test
>
> The DBNAME is .......................: remedy
>
> ----------------------------------------------------
>
> Begin the export process at .........: Mon Mar 20 16:35:28 EST 2006
>
> **** EXPORT SUCCESS ****
>
>
>
> However, when the output is mailed it is off:
>
>
>
> EXPORT FOR remedy
>
> ----------------------------------------------------
>
> Todays date is ......................: 20060320
>
> The Log File for Today is ...........:
> /backup/exports/remedy_export.log_20060320
>
> The Path for Oracle Home is .........: /oracle/app/oracle/product/10.2.0
> The hostname is .....................: test The DBNAME is
> .......................: remedy
>
> ----------------------------------------------------
>
> Begin the export process at .........: Mon Mar 20 16:35:28 EST 2006
>
> **** EXPORT SUCCESS ****
>
>
>
> *Any suggestions on how I can make sure "the hostname" and The DBNAME are
> on separate lines?*
>
>
>
>
>
>
> ------------------------------
>
> This electronic message transmission is a PRIVATE communication which
> contains information
> which may be confidential or privileged. The information is intended to be
> for the use of the individual
> or entity named above. If you are not the intended recipient, please be
> aware that any disclosure,
> copying, distribution or use of the contents of this information is
> prohibited. Please notify the sender
> of the delivery error by replying to this message, or notify us by
> telephone (877-633-2436, ext. 0),
> and then delete it from your system.
>
>
>
>
>
> Look like you try to open a unix text file with notepad, try wordpad? or
> try ftp with asc mode
>
>
> --
> regards,
>
> Sinardy
>

--
Jared Still
Certifiable Oracle DBA and Part Time Perl Evangelist

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Mar 21 2006 - 09:00:19 CST

Original text of this message

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