Solved

uuencode

Posted on 2013-06-06
5
388 Views
Last Modified: 2013-06-06
In the below shell, I wanted to know what is this uuencode doing..please help !

uuencode  $tradehome/$log/offset_trade.csv  $tradehome/$log/offset_trade.csv | /usr/ucb/mail -s "OFFSET TRADE EXCEPTION" ODSOffsetTradeExceptions@caxton.com



#!/bin/ksh -xve
# 01/26/01 SV  removed the Count(1) from the table
date
#rm   $tradehome/$log/offset_trade.csv
#touch  $tradehome/$log/offset_trade.csv
#chmod 777 $tradehome/$log/offset_trade.csv
echo "Started loading offset_trade_exception \n"
sqlplus -s $odsuser/$odspass <<!
whenever oserror  exit failure
whenever sqlerror exit failure
--
exec offset_trade_excep
--
!
echo "Finished Loading offset_trade_exception\n"
uuencode  $tradehome/$log/offset_trade.csv  $tradehome/$log/offset_trade.csv | /usr/ucb/mail -s "OFFSET TRADE EXCEPTION" ODSOffsetTradeExceptions@caxton.com
date

Open in new window

0
Comment
Question by:d27m11y
  • 2
  • 2
5 Comments
 
LVL 3

Assisted Solution

by:tsnirone
tsnirone earned 250 total points
ID: 39226208
Seems the file:

$tradehome/$log/offset_trade.csv

gets encoded to itself (overwrite)

before it gets sent to that email adress with a subject of "OFFSET TRADE EXCEPTION"

In short: Its a formatting thing done to ensure that the receiver of the email can actually read the file sent.

http://en.wikipedia.org/wiki/Uuencoding

Hope this helps :)
0
 

Author Comment

by:d27m11y
ID: 39226862
Is it used to convert Binary to ASCII.. is that what it is doing here ?
0
 
LVL 3

Accepted Solution

by:
tsnirone earned 250 total points
ID: 39226906
Yes.

"Uuencoding is a form of binary-to-text encoding that originated in the Unix program uuencode, for encoding binary data for transmission over the uucp mail system." (from wiki)

:)
0
 

Author Closing Comment

by:d27m11y
ID: 39226942
understood..
0
 
LVL 84

Expert Comment

by:ozo
ID: 39227621
man uuencode
NAME
     uudecode, uuencode -- encode/decode a binary file

SYNOPSIS
     uuencode [-m] [-o output_file] [file] name
     uudecode [-cips] [file ...]
     uudecode [-i] -o output_file [file]

DESCRIPTION
     The uuencode and uudecode utilities are used to transmit binary files over transmission mediums that do not support other than
     simple ASCII data.

     The uuencode utility reads file (or by default the standard input) and writes an encoded version to the standard output, or
     output_file if one has been specified.  The encoding uses only printing ASCII characters and includes the mode of the file and
     the operand name for use by uudecode.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Problem Imaging Computers With Clonezilla 2 82
Oracle Finace 3 66
how to run my script during boot in rhel 7 14 100
Batch Login Script - Update default homepage 8 41
Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now