need help in format an attachment


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting need help in format an attachment
# 1  
Old 05-04-2009
need help in format an attachment

i have an o/p file called "all_rep_files.txt" . Below is the command i m using in my script to send the attachement. but the problem is when the attachment is opened in oulook the contents of the attachments is in a staright line.

Code:
(uuencode all_rep_files.txt all_rep_files.txt) | mail -s "All Files are FTP to Oncor.com" abcd@unix.com

contents of attachment in unix aix 5.3. This same format i want when the attachment is received
Code:
-rwxrwxrwx   1 owner    group        29109210 May  3 18:05 Interval_Daily_readings05032009.txt

-rwxrwxrwx   1 owner    group         1415739 May  3 17:44 Interval60min_Daily_readings05032009.txt

-rwxrwxrwx   1 owner    group          324317 May  3 16:04 Daily_readings05032009.txt

-rwxrwxrwx   1 owner    group        29136019 May  2 19:11 Interval_Daily_readings05022009.txt

-rwxrwxrwx   1 owner    group         1416159 May  2 18:39 Interval60min_Daily_readings05022009.txt

-rwxrwxrwx   1 owner    group          334463 May  2 18:13 Daily_readings05022009.txt

-rwxrwxrwx   1 owner    group        29187066 May  1 19:03 Interval_Daily_readings05012009.txt

-rwxrwxrwx   1 owner    group         1415772 May  1 18:34 Interval60min_Daily_readings05012009.txt

-rwxrwxrwx   1 owner    group          325864 May  1 16:17 Daily_readings05012009.txt

*******************************************************************************

-rwxrwxrwx   1 owner    group      1092704279 May  3 18:01 Interval_Daily_readings05032009.txt

-rwxrwxrwx   1 owner    group       127725991 May  3 17:42 Interval60min_Daily_readings05032009.txt

-rwxrwxrwx   1 owner    group        11971342 May  3 15:56 Daily_readings05032009.txt

-rwxrwxrwx   1 owner    group      1096362718 May  2 19:07 Interval_Daily_readings05022009.txt

-rwxrwxrwx   1 owner    group       127750692 May  2 18:36 Interval60min_Daily_readings05022009.txt

-rwxrwxrwx   1 owner    group        12482686 May  2 18:10 Daily_readings05022009.txt

-rwxrwxrwx   1 owner    group      1095867209 May  1 18:59 Interval_Daily_readings05012009.txt

-rwxrwxrwx   1 owner    group       127713772 May  1 18:31 Interval60min_Daily_readings05012009.txt

-rwxrwxrwx   1 owner    group        12336351 May  1 16:15 Daily_readings05012009.txt

*******************************************************************************

-rwxrwxrwx   1 owner    group         1522332 May  3 17:23 Interval60min_Daily_readings05032009.txt

-rwxrwxrwx   1 owner    group        23529710 May  3 17:10 Interval_Daily_readings05032009.txt

-rwxrwxrwx   1 owner    group          205541 May  3 15:42 Daily_readings05032009.txt

-rwxrwxrwx   1 owner    group         1523440 May  2 18:17 Interval60min_Daily_readings05022009.txt

-rwxrwxrwx   1 owner    group        23666933 May  2 18:05 Interval_Daily_readings05022009.txt

-rwxrwxrwx   1 owner    group          214082 May  2 17:57 Daily_readings05022009.txt

-rwxrwxrwx   1 owner    group         1522578 May  1 18:09 Interval60min_Daily_readings05012009.txt

-rwxrwxrwx   1 owner    group        23692642 May  1 17:55 Interval_Daily_readings05012009.txt

-rwxrwxrwx   1 owner    group          209395 May  1 15:47 Daily_readings05012009.txt

*******************************************************************************

# 2  
Old 05-04-2009
Try to add a CR at the end of the lines of the attachment:

Code:
sed 's/$/^M/' file > newfile

Type <CtRL>-v <Enter> to get the ^M.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need script for transferring bulk files from one format to text format

"Help Me" Need script for transferring bulk files from one format to text format in a unix server. Please suggest (2 Replies)
Discussion started by: Kranthi Kumar
2 Replies

2. Solaris

Sent an email attachment, but the attachment is empty

I'm trying to send a .zip file from my unix box to my work email (email client outlook) The file name that I'm trying to sent is sites.zip and this is how I do it: uuencode sites.zip | mailx -s "testing" myname@mydomain.com When I open the .zip, the zip is empty. Looking around the we, I... (17 Replies)
Discussion started by: amb1s1
17 Replies

3. Shell Programming and Scripting

Mail attachment dispaying in different format.

Hi friends, I have file1.txt where i am sending this file as attatment in mail using below code uuencode file1.txt file1.txt | mail -s 'TestFile' test@test.com but the format of the file is changing when i open in attachement. file1.txt in unix 1|hyd|nag 2|jun|kin ... (4 Replies)
Discussion started by: i150371485
4 Replies

4. Shell Programming and Scripting

Format of content displayed in the attachment of email

Hi, I'm facing a problem in mailing attachments using uuencode in mailx. I got to attach a couple of flatfiles. I'm able to attach and mail the files successfully. But there is a problem in the format of the flatfiles when they are received as an attachemnt. For Example : Consider... (0 Replies)
Discussion started by: Sindhuap
0 Replies

5. Shell Programming and Scripting

html format email with attachment in unix

Team, I have the below code, which is working fine and it sends the html report using sendmail command. I want to attach one more file ( which goes as attachment ) in that email. How to achieve it. i tried with uuencode. But no luck :mad: outputFile="/tmp/out.html" ( echo... (2 Replies)
Discussion started by: itkamaraj
2 Replies

6. Shell Programming and Scripting

Converting windows format file to unix format using script

Hi, I am having couple of files which i used to copy from windows to Linux, so now in case of text files (CTRL^M) appears at end of line. I know i can convert this windows format file to unix format file by running dos2unix. My requirement here is that i want to do it automatically using a... (5 Replies)
Discussion started by: sarbjit
5 Replies

7. UNIX for Advanced & Expert Users

How to send email as HTML format with attachment ?

hi.. Could somebody help me how to sent an attachment using sendmail command and the content is HTML format ?. Below is my code to sent the email as HTML but i do not know how to sent the attachment, please help me To: "BAHARIN HASAN"<baharin.hasan@gmail.com> from: "DATAONE SDN... (4 Replies)
Discussion started by: bh_hensem
4 Replies

8. Shell Programming and Scripting

Retaining the Unix CSV format in Excel format while exporting

Hi All, I have created a Unix Shell script whch creates a *.csv file and export it to Excel. The problem i am facing is that Users wants one of the AMOUNT field in comma separted values. Example : if the Amount has the value as 3000000 User wants to be in 3,000,000 format. This Amount format... (2 Replies)
Discussion started by: rawat_me01
2 Replies

9. Shell Programming and Scripting

Adding an attachment as an attachment to mailx

I don't want the attachment embedded in the mail. I would like a file attached. When I do mailx -s "Report, `date +'%D %r` " -r "Notifications" bob@bob.com < /usr/local/bin/myreport.log> /dev/null It gets embedded in my email. I want a file attachment. How do I do that? (2 Replies)
Discussion started by: guessingo
2 Replies

10. Shell Programming and Scripting

Format disorder after email with attachment

Hello My script is to email a textfile(abc) in unix. I open abc.txt using window notepad. All the "Enter Key"(line break) are found missed. However, it is no problem using window wordpad. uuencode abc abc.txt | mailx -s "Email Subject" someone@email.com How can I adjust the above command... (1 Reply)
Discussion started by: on9west
1 Replies
Login or Register to Ask a Question