Sponsored Content
Full Discussion: uuencode and mailx problem
Operating Systems Solaris uuencode and mailx problem Post 302249950 by zeekstern on Wednesday 22nd of October 2008 11:52:50 AM
Old 10-22-2008
Darn, thanks Annihilannic. I must have read the man pages a 100 times and didn't notice that. I even read a heck of a lot of posts that had them reversed like I did because that's how I got the idea to add the .doc extension.Smilie

Zeek
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

mailx and uuencode question

I have this code below that works well. I also want to attach a logfile to the email. The first part of this code is the body of the email. echo "The size of $dirname/$f1 size = $f1size, and $dirname/$f2 = $f2size'" | mailx -s "Error with file sizes on $HOST Server" xyz@company.com ... (1 Reply)
Discussion started by: ssmiths001
1 Replies

2. Shell Programming and Scripting

Problem with uuencode

I a script i telnet port 25 and part of the attachment is echo "Content-type: application/msword; filename= "$3" " echo Content-transfer-encoding: base64 echo "Content-disposition: attachment; filename= "$3" " echo uuencode -m "$3" /dev/stdout $3 is a word document. When i send... (0 Replies)
Discussion started by: markms
0 Replies

3. Shell Programming and Scripting

uuencode/mailx

Hi all, I know how to use the uuencode/mailx commands to mail a single file within a directory, e.g. uuencode file.dat file.dat | mailx joe.smith@mail.com but now, i need to be able to mail every file within the directory with one command, any ideas? thanks :b: (1 Reply)
Discussion started by: ocelot
1 Replies

4. Shell Programming and Scripting

mailx, uuencode problem

I've this command to run ... Purpose : Send attachment file with e-mail body... ( E-mail body i read it from text file) uuencode TEST_FILE.csv TEST_FILE.csv | cat /usr/local/bin/EMAIL_BODY.txt - | mailx -s "TEST Report" -c receiver1@mail.com receiver2@mail.com Here is the... (2 Replies)
Discussion started by: prash184u
2 Replies

5. Shell Programming and Scripting

uuencode mailx - send multiple emails

The following is an extract from one of my Shell Scripts which uses uuencode and mailx to send an email with multiple attachements: uuencode $LOG_REPORT $(basename $LOG_REPORT) uuencode $HTML_FILE $(basename $HTML_FILE ) ) | if then mailx -b "$COPY_TO" -s "$SUBJECT" -r "$MAIL_FROM"... (2 Replies)
Discussion started by: suthera
2 Replies

6. Shell Programming and Scripting

Not able to send multiple attachments using uuencode and mailx

Hi, I am seeing some junk characters when I attach the second file, given below is the logic I used. Please help me resolving the issue. ( uuencode file1.txt file1.txt.lst && uuencode file2.txt file2.txt.lst ) > attachment.txt cat body.txt attachment.txt > combinemail.txt mailx -m... (7 Replies)
Discussion started by: prasperl
7 Replies

7. Shell Programming and Scripting

How to embed a html file in a mail sending from Linux box with uuencode or mailx?

How to embed a html file as subject in a mail sending from Linux box with uuencode or mailx or any other way? we do not want the file as attachment, it should be embedded in the mail subject. (2 Replies)
Discussion started by: johnveslin
2 Replies

8. Shell Programming and Scripting

Help with mailx, uuencode

Here's my code - FILES="file1 file2 file3" for File in ${FILES}; do uuencode "${File}" "$(basename ${File}" done | mailx email@id.com This works as expected, meaning emailing the files as attachments but with null body. Now what I want is a way to have the Body list the files in order e.g. ... (8 Replies)
Discussion started by: nexional
8 Replies

9. Shell Programming and Scripting

Uuencode & Mailx

hi, i am trying to send a pdf attachment which has a name of 200 characters using uuencode and mailx. But the email is not getting delivered. uuencode <filename.pdf> <filename.pdf> | mailx -s "Test" <email_id> (2 Replies)
Discussion started by: ATWC
2 Replies

10. Shell Programming and Scripting

Mailx attachment using uuencode issue on Outlook2013

Hello all I am on RHEL 6.4. I have been using my bash script which mails one .csv file after zipping (myfile.csv.zip)to my Lotus Notes ID. I use uuencode with mailx to do this. Here is my command - uuencode myfile.csv.zip myfile.csv.zip | mailx -s "Subject" mailid. This all works very cool. Now... (3 Replies)
Discussion started by: krsnadasa
3 Replies
uuencode(1)						      General Commands Manual						       uuencode(1)

NAME
uuencode, uudecode - encode/decode a binary file for transmission by mailer SYNOPSIS
[source_file] remotedest outfile] [encoded_file] DESCRIPTION
and can be used to send a binary file to another machine by means of such services as or (see elm(1), mailx(1), and uucp(1)). takes the named source file (default standard input) and produces an encoded version on the standard output. The encoding uses only print- ing ASCII characters, includes the original mode of the input file, and preserves the value of the remotedest argument which is the intended name of the file when it is restored later on the remote system. reads an encoded file (the encoded_file argument), ignores any leading and trailing lines added by mailers, and recreates the original file with the specified mode and name. The encoded file is an ordinary ASCII text file and can be edited with any text editor to change the mode or remote name. Options and Arguments recognizes the following command-line option: Encode the input file using the MIME Base64 algorithm. If is not specified, the historical algorithm encodes the input. recognizes the following command-line option and argument: Specifies the pathname of the file that holds the decoded output. This file is not the same as remotedest which was specified at the time of encoding the file. uuencode Base64 Algorithm The encoded file is a text file, encoded in the character set of the current locale (the portable character set). The file begins with the line: and ends with the line: Both of the above lines have no preceding or trailing blank characters. The encoding process represents each 24-bit group of input bits as output strings of four encoded characters. Proceeding from left to right, each 24-bit input group is formed by concatenating three 8-bit input groups. Each such 24-bit input group is then treated as four concatenated 6-bit groups, each of which would be translated into a single digit in the Base64 alphabet shown in the following table. Value Encoding Value Encoding Value Encoding Value Encoding ------------------------------------------------------------------ 0 A 17 R 34 i 51 z 1 B 18 S 35 j 52 0 2 C 19 T 36 k 53 1 3 D 20 U 37 l 54 2 4 E 21 V 38 m 55 3 5 F 22 W 39 n 56 4 6 G 23 X 40 o 57 5 7 H 24 Y 41 p 58 6 8 I 25 Z 42 q 59 7 9 J 26 a 43 r 60 8 10 K 27 b 44 s 61 9 11 L 28 c 45 t 62 + 12 M 29 d 46 u 63 / 13 N 30 e 47 v 14 O 31 f 48 w (pad) = 15 P 32 g 49 x 16 Q 33 h 50 y When encoding a bit stream via the Base64 encoding, the bit stream is presumed to be ordered with the most-significant bit first. That is, the first bit in the stream shall be the high-order bit in the first byte, and the eighth bit shall be the low-order bit in the first byte, and so on. Each line of the encoded output can have only 76 characters or less. If there are less than 24 bits available at the end of a message or encapsulated part of a message, zero bits are added (on the right) to form an integral number of 6-bit groups. Output character positions that are completely made of the padded zero bits are set to the equal character Because all Base64 input is an integral number of octets, only the following cases can arise at the end of an input bit stream: 1. If the final quantum of encoding input is an integral multiple of 24 bits, the final unit of encoded output is an integral multi- ple of 4 characters with no padding character. 2. If the final quantum of encoding input is exactly 16 bits, the final unit of encoded output is three characters followed by one padding character. 3. If the final quantum of encoding input is exactly 8 bits, the final unit of encoded output is two characters followed by two pad- ding characters. All line breaks and other non-Base64 characters are ignored by A terminating evaluates to nothing and denotes the end of the encoded data. uuencode Historical Algorithm The encoded file is a text file, encoded in the character set of the current locale (the portable character set). It begins with the line: and ends with the line: Both of the above lines have no preceding or trailing blank characters. This algorithm takes three octets as input and writes four characters of output by splitting the input at 6-bit intervals. The four 6-bit groups make four octets each of which contain data in the lower six bits only. These octets are converted to characters by adding a value of 0x20 to each octet, so that each octet is in the range [0x20,0x5f]. That is, it is assumed to represent a printable character in the ISO/IEC 646:1991 standard encoded character set. Each octet is then translated into the corresponding character code for the codeset in use in the current locale before writing the encoded output. When the bits of two octets are combined, the least significant bits of the first octet are shifted left and combined with the most signif- icant bits of the second octet shifted right. Thus the three octets A, B, C are converted into the following four octets: 0x20 + (( A >> 2 ) & 0x3F) 0x20 + (((A << 4) | ((B >> 4) & 0xF)) & 0x3F) 0x20 + (((B << 2) | ((C >> 6) & 0x3)) & 0x3F) 0x20 + (( C ) & 0x3F) These octets are then translated into the local character set. Each encoded line contains a length character, equal to the number of characters to be decoded plus 0x20 translated to the local character set as described above, followed by the encoded characters. Each line of the encoded output has only 45 characters or less. EXAMPLES
The following example encodes a file (using the historical algorithm) with as the intended name on the remote system and saves the output in Similarly, the following example uses the option to encode a file (using the MIME Base64 algorithm) with as the intended name on the remote system and saves the output in The following example shows how to encode and send a compiled program to user After receiving the mail message, user can decode the program to a file with the same name as the original file by first saving the message in a file and executing the command: Similarly, the user can also decode the program to a file named by first saving the message in a file and executing the command: WARNINGS
The file is expanded by 35% (three bytes become four plus control information) causing it to take longer to transmit. The user on the remote system who is invoking (often must have write permission for the specified file. If an encoded file has the same name as the destination name specified in it, starts overwriting the encoded file before decoding is com- pleted. SEE ALSO
elm(1), mail(1), mailx(1), shar(1), uucp(1), uux(1), uuencode(4). STANDARDS CONFORMANCE
uuencode(1)
All times are GMT -4. The time now is 02:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy