problem in sending out content in unix


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers problem in sending out content in unix
# 1  
Old 07-16-2009
problem in sending out content in unix

Hello all!!

i got a problem in the email content format in outlook which i mail it from a unix.

i want the content to be multiple lines as i see in unix, but the content is grouped into a single line instead in the email content.

The email content is made from tail of a file, and echo message

for example,

Code:
echo "Hello 1" >>log
echo "Hello 2" >>log
echo "Hello 3" >>log

The email content would become
Code:
Hello 1 Hello 2 Hello 3

i don't want single line , please kindly give me ideas on how to solve the problem out.

Last edited by Yogesh Sawant; 07-17-2009 at 06:51 AM.. Reason: added code tags
# 2  
Old 07-17-2009
Put a \n in your echo...
Code:
echo "Hello 1\n" >> log

Doesn't it work?
# 3  
Old 07-17-2009
use print command
or echo -n
# 4  
Old 07-17-2009
to rakeshawasthi ,

yes , it would work ! but it would be like below (which is too much lines )

file content start below ----------------------
Hello 1

Hello 2

Hello 3
file content end below ----------------------


is it possible to make it like below ??
file content start below ----------------------
Hello 1
Hello 2
Hello 3
file content end below ----------------------

---------- Post updated at 08:29 PM ---------- Previous update was at 07:49 PM ----------

to vidyadhar85 ,

echo -n don't work ar.....
> echo -n "Hello 1"
THe result would be
> -n Hello 1

For the print command, it works .......but for some sentences only
i mean it works for "Hello 1" message but not for ... the below one

print "Calculating result ( $VAR) as checked at `date`" >> log

i tested the print command with "Hello" message, the problem is gone
but when i tested with my real message, the problem is still here, they are all in a single line.
# 5  
Old 07-17-2009
I have seen this effect caused by a setting in Microsoft Office Outlook.
See:
Tools/Options/Preferences/E-mail Options/"Remove extra lines breaks in plain text messages"

Also:
Can you post the script in case the way the message is presented to your mail command causes the problem.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help needed in sending file content with colors and borders

HI i am running a shell script in cron and storing the output of that script in a file say test.then i am copying the content of test to test1 and i will send the output of test to some email ids using mutt. Next time when the script executes i am comparing the contents of test and test1 and... (3 Replies)
Discussion started by: venkitesh
3 Replies

2. Shell Programming and Scripting

Body content is in random format while sending email from Linux to my outlook.

Hi I have a script running in lunix machine which emails log file content to my outlook. Here is the actual log file result: Image-1 In-Master:25028 ReplicaDn Consumer Supplier Delay dc=xxx,dc=com lmjker0110:12345 ... (4 Replies)
Discussion started by: buzzme
4 Replies

3. Shell Programming and Scripting

Problem in sending mail with database content

Hi All, I want to fetch records from Oracle DB table and send it in a mail to a set of users. i.e, I have a query which returns a set of records. I want to send mail with below content: Hi , PFB the details: <first database record> <Second database record> ……………. ………………..... (3 Replies)
Discussion started by: anil029
3 Replies

4. Shell Programming and Scripting

Mail sending with multiple attachement(pdf and csv) with html content from Linux

Hi, We have a requirement to send multiple attachment(pdf and csv) along with html content in a single mail. For that we are using uuencode. It is working for single pdf attachment and html content. But we are unable to send both pdf and csv attachment with html content. Below is the script.... (5 Replies)
Discussion started by: dholea
5 Replies

5. Shell Programming and Scripting

sending content of a file in Expect

How Can I send the content of a file in Expect? Do I have to use cat command in a way? if yes how? lets say my file is called 1.txt. example: expect "Enter command to send:" {send "???? \r"} ???? --> content of the file 1.txt (1 Reply)
Discussion started by: alireza6485
1 Replies

6. Solaris

Problem in Sending Arabic message in Unix

I have developed an application in java which sends arabic as well as english messages(SMS). First I deployed the same on windows machine and it sends the messages in both the languages. Due to some performance issue thought of migrating to UNIX. On the unix testing machine, when i tested it out,... (5 Replies)
Discussion started by: jacobkuncheria
5 Replies

7. UNIX for Advanced & Expert Users

Reading a file and sending mail based on content of the file

Hi Gurus, I am having an requirement. i have to read a list file which contains file names and send mail to different users based on the files in the list file. eg. if file a.txt exists then send a mail to a@a.com simillary for b.txt,c.txt etc. Thanks for your help, Nimu (6 Replies)
Discussion started by: nimu1979
6 Replies

8. Shell Programming and Scripting

FTP script for sending a file from one unix directory to another unix server director

Hi, My local server is :/usr/abcd/ Remote server is :/Usr/host/test/ I want to send files from local unix directory(All files starting with O_999) to remote host unix directory. Can any body give me the Unix Shell script to do this. One more doubt: Shall we need to change the file... (1 Reply)
Discussion started by: raja_1234
1 Replies

9. UNIX for Dummies Questions & Answers

sending mail with html content

hi, I am new to unix. I need send html content as a mail from my sun-solaris2.6 work station. When I tried that the recipient gets it as html code with all the tags. any solutions? thanx in advance (2 Replies)
Discussion started by: gmchoudary
2 Replies

10. UNIX for Dummies Questions & Answers

Maingrame to UNIX sending UNIX commands

I want to know if there is a way to send unix commands thru FTP from a mainframe to kick off Autosys Jobs. I just need to send a command from the mainframe to UNIX and have UNIX execute that command. (2 Replies)
Discussion started by: skammer
2 Replies
Login or Register to Ask a Question