Solved

uuencode

Posted on 2013-06-06
5
400 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
[X]
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
  • 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Unix, date minus 1, 2 or 3 days (last working day) 11 95
Powershell Script need assistance to make some changes 4 108
Unix Command (AIX) 3 49
grep command usage 10 28
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…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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…

734 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