Sponsored Content
Top Forums Shell Programming and Scripting need help in format an attachment Post 302312929 by ali560045 on Monday 4th of May 2009 06:21:03 AM
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

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

 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
unix2dos(1)						      General Commands Manual						       unix2dos(1)

NAME
unix2dos - UNIX to DOS text file format converter SYNOPSYS
unix2dos [options] [-c convmode] [-o file ...] [-n infile outfile ...] Options: [-hkqV] [--help] [--keepdate] [--quiet] [--version] DESCRIPTION
This manual page documents unix2dos, the program that converts text files in UNIX format to DOS format. OPTIONS
The following options are available: -h --help Print online help. -k --keepdate Keep the date stamp of output file same as input file. -q --quiet Quiet mode. Suppress all warning and messages. -V --version Prints version information. -c --convmode convmode Sets conversion mode. Simulates unix2dos under SunOS. -o --oldfile file ... Old file mode. Convert the file and write output to it. The program default to run in this mode. Wildcard names may be used. -n --newfile infile outfile ... New file mode. Convert the infile and write output to outfile. File names must be given in pairs and wildcard names should NOT be used or you WILL lost your files. EXAMPLES
Get input from stdin and write output to stdout. unix2dos Convert and replace a.txt. Convert and replace b.txt. unix2dos a.txt b.txt unix2dos -o a.txt b.txt Convert and replace a.txt in ASCII conversion mode. Convert and replace b.txt in ISO conversion mode. unix2dos a.txt -c iso b.txt unix2dos -c ascii a.txt -c iso b.txt Convert and replace a.txt while keeping original date stamp. unix2dos -k a.txt unix2dos -k -o a.txt Convert a.txt and write to e.txt. unix2dos -n a.txt e.txt Convert a.txt and write to e.txt, keep date stamp of e.txt same as a.txt. unix2dos -k -n a.txt e.txt Convert and replace a.txt. Convert b.txt and write to e.txt. unix2dos a.txt -n b.txt e.txt unix2dos -o a.txt -n b.txt e.txt Convert c.txt and write to e.txt. Convert and replace a.txt. Convert and replace b.txt. Convert d.txt and write to f.txt. unix2dos -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt DIAGNOSTICS
BUGS
The program does not work properly under MSDOS in stdio processing mode. If you know why is that so, please tell me. AUTHOR
Benjamin Lin - ( blin@socs.uts.edu.au ) MISCELLANY
Tested environment: Linux 1.2.0 with GNU C 2.5.8 SunOS 4.1.3 with GNU C 2.6.3 MS-DOS 6.20 with Borland C++ 4.02 Suggestions and bug reports are welcome. SEE ALSO
dos2unix(1) 1995.03.31 unix2dos v2.2 unix2dos(1)
All times are GMT -4. The time now is 06:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy