In Outlook spooled file data is not getting displayed properly


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting In Outlook spooled file data is not getting displayed properly
# 1  
Old 09-13-2012
Java In Outlook spooled file data is not getting displayed properly

I am fetching a database table in spool file and send that details as a email.

The Spooled file content is properly being displayed in UNIX.

See Example below :
Code:
        ID|FILENAME         |ABCDEF_DT |PROCESSED_DT        |STATUS
----------|-----------------|----------|--------------------|----------
         1|FILENAME         |09-sep-2012|11-sep-2012 04:09:31|SUCCESS
         2|FILENAME         |02-jul-2012|11-sep-2012 04:09:58|SUCCESS
         3|FILENAME         |09-sep-2012|11-sep-2012 04:09:38|SUCCESS

However, when i send the same content as a email. The data is not displayed properly ("-----|---- '' this lines are getting repeated after the column name )

See example below which is being displayed in outlook:
Code:
        ID|FILENAME          |ABCDEF_DT |PROCESSED_DT        |STATUS
----------|------------------|----------|--------------------|--
----------|------------------|----------|--------------------|--
----------|------------------|----------|--------------------|--
----------|------------------|----------|--------------------|--
----------|------------------|----------|--------------------|--
----------|------------------|----------|--------------------|--
----------|------------------|----------|--------------------|--
----------|------------------|----------|--------------------|-
	 1|FILENAME         |09-sep-2012|11-sep-2012 04:09:31|SUCCESS
         2|FILENAME         |02-jul-2012|11-sep-2012 04:09:58|SUCCESS
         3|FILENAME         |09-sep-2012|11-sep-2012 04:09:38|SUCCESS


I am spooling the file and then using the below command to send an email.
Also, have set the below for the sool file:

Code:
set feedback off lines 32766 TERM OFF pagesize 32766 trimspool on colsep "|"

Code:
cat $spool_file_name | mailx -s "message" -r email_id


Can anyone help me out to resolve this issue and to get the output similar to the spool file generate in unix. (i.e. avoid repetition of "-------|-----" after column)


Thanks in Advance !!
# 2  
Old 09-13-2012
There are plenty post on the subject in the forum, di you do a little search?
look here for a start, should give you clues on what is missing...
https://www.unix.com/shell-programmin...tachments.html
# 3  
Old 09-13-2012
Debian

yah i did lot of searches here, but it dint resolved my issue.
Smilie

---------- Post updated at 09:36 AM ---------- Previous update was at 04:14 AM ----------

The only option left with me is to delete the below pattern from the spool file and send it as an email .
Code:
"----------|------------------|----------|--------------------|--"


As a work around this works for me as of now.Smilie

If you guys have any other suggestions then please share.Smilie
# 4  
Old 09-13-2012
You didnt say if you tried with uuencode as in the link given above...
# 5  
Old 09-20-2012
You want me to use the below way?

Code:
cat $spool_file_name | uuencode | mailx -s "message" -r email_id

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Tee doesn't write all displayed data into text file

"Debain 9 - LXDE" I execute follow line in the bash terminal: /ts3/server/ts3server_startscript.sh start createinifile=1 | tee -a /ts3/server/key.txt The displayed output looks like follow: My key.txt file looks like follow: How can i save the whole displayed text in my file? Why does... (5 Replies)
Discussion started by: int3g3r
5 Replies

2. UNIX for Beginners Questions & Answers

How do I sort data in column properly?

Can i use 'column' command to get the required 3rd column output? Input example: 1 2 345678 90 2 2 356 42 3 3 8265 55 Output required: 1 2 345678 90 2 2 356 42 3 3 8265 55 Basically i want the 3rd column to be justified to the right, instead of left.... (3 Replies)
Discussion started by: nurul_nadzirah
3 Replies

3. Shell Programming and Scripting

Get filesize and checksum of spooled file in a log file ...

Hi All, I have spooled some data in a file (a.dat, b.dat etc..) and after that I want to get the size and checksum of spooled file (a.dat, b.dat etc..) in a log file(file_info.log). By the way I dont want lost the previous output file info(Append data). View of log file that I want to... (5 Replies)
Discussion started by: ce_emre21
5 Replies

4. Shell Programming and Scripting

Long line displayed as multiple lines in Outlook. Please help!

When a file generated by a shell script is sent as a mail (not as an attachment), in MS Outlook, single lines of the file are displayed as two/three lines (as the lines are long). Is there a way to make each line to be displayed in 'single line with scroll bar' to enable viewing of the long line? (2 Replies)
Discussion started by: thulasidharan2k
2 Replies

5. Shell Programming and Scripting

Long line displayed as multiple lines in Outlook. Please help!

When a file generated by a shell script is sent as a mail (not an attachment), in MS Outlook, single lines of the file are displayed as two/three lines (as the lines are long). Is there a way to make each line to be displayed in 'single line with scroll bar' to enable viewing of the long line? ... (0 Replies)
Discussion started by: thulasidharan2k
0 Replies

6. Homework & Coursework Questions

Option to save data thats displayed?

Im trying to come up with a simple shell script to display info about the current user.`pwd`; `date` ; `who am i` I want to give the option to save all the data thats display by the commands to a log file. With a timestamp as the name of the file This is where im stuck echo "Would you like to... (3 Replies)
Discussion started by: eddieq20
3 Replies

7. Shell Programming and Scripting

Data displayed in two lines

Hi, I am a newbie to both Linux and this forum. I was trying to pull out the data from a database but it is not showing up in the multiple lines, with my limited knowledge i linux u tried to format this but wasn't exactly getting what i wanted. The screenshot below shows my problem. ... (2 Replies)
Discussion started by: Ninjaa
2 Replies

8. UNIX for Dummies Questions & Answers

spooled file getting distorted when sending through unix mail

Hi Folks, I'm spooling a file through sqlplus and sending using mailx but the output got distorted in MS-outlook. Thanks in advance (2 Replies)
Discussion started by: chgopi
2 Replies

9. UNIX for Advanced & Expert Users

Directory where spooled file is stored

I am spooling a text file to printer under Sun Solaris m/c (solaris 7). I want to know which directory the spooled text file is stored before it goes to printer. B'se my main problem is to find the escape sequence from the text file to get landscape orientation. Now when ever I spool a file... (1 Reply)
Discussion started by: babulilly
1 Replies
Login or Register to Ask a Question