Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

uuencode

Posted on 2013-06-06
5
396 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:

809 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