Hi I am a newbie here. I tried searching for the solution but I guess I either didn't find it or there hasn't been one posted.
my problem is I spooled the results of a query into a .txt file. When I cat the file the formating looks great. All the columns are aligned. However once I mailx the file to myself the formating is off. I tried playing with the set values in the query to compensate but mailx just seems to screw it up. How can I mail the results to myself with the formating still intact?
The spooling in the query is a simple
SPOOL ${BASE_DIR}/Report_${DATESTAMP}.txt;
I'm just using a simple
mailx -s "Subject" email < Report_${DATESTAMP}.txt
Please post what Operating System and version you have. There is a much variation in the mailx command.
Please mention what mail client you are using (e.g. Microsoft Outlook 2007).
Please mention which database engine ran the SQL line.
Do you want the data to appear in the mail body or as an attachment?
The usual answer to this question is to convert the file to MSDOS format using the ux2dos command (on some systems unix2dos ). If you need it as an attachment then pipe it through the unix uuencode .
There can be further minor issues with modern Microsoft Office mail clients wherby you need to turn off the setting which ignores new lines in the mail body.
Sorry. I am new to this forum. Here is the requested info:
OS - SunOS 5.10 Generic_144501-19 i86pc i386 i86pc
Mail Client - Outlook 2010
Database - SQL*Plus: Release 10.2.0.4.0
I would like the results to be put in a txt file then have it mailx in the body of the email.
Thank you for your help.
Edit - Also I man ux2dos and dos2ux. It doesn't appear that these 2 commands are available.
man ux2dos
No manual entry for ux2dos.
man dos2ux
No manual entry for dos2ux.