The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-07-2008
adzuanamir adzuanamir is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 40
Pls Pls do help me

When i run this command, everything is ok. The file can be email and attached but soon after i download the file, the file cant be read. It's seem corrupted. Totally cant be read although i'm using context or wordfile. Original file generated at ek_bkup/alert/tbspace_datafile.log is OK.....

Script sample :
tbspace_datafile.sql
------------------------------------------------------------------------
sqlplus / as sysdba @tbspace_datafile.sql > /ek_bkup/alert/tbspace_datafile.log

uuencode ek_bkup/alert/tbspace_datafile.log tbspace_datafile.log | mailx -r oraadm@juwpkl.gov.my -s "Oracle Tspace and Datafile Update" adzuan@nc.com.my
------------------------------------------------------------------------

Please somebody help me why this happened????
  #2 (permalink)  
Old 07-07-2008
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2007
Location: Germany
Posts: 2,259
Maybe tar the file before you send it, untar it when you receive it and check if it's content is ok.
  #3 (permalink)  
Old 07-07-2008
joeyg's Avatar
joeyg joeyg is offline Forum Staff  
modérateur
  
 

Join Date: Dec 2007
Location: Home of 17-time world champion Boston Celtics
Posts: 1,311
Question Not sure why, but I have always referenced the file twice

With my uuencode command in format:
Code:
uuencode file1 file1 | mailx -s "Oracle Tspace and Datafile Update" oraadm@juwpkl.gov.my
Your first reference to the file1 gives an absolute path, while your second does not. Perhaps the issue?
  #4 (permalink)  
Old 07-07-2008
Annihilannic Annihilannic is offline Forum Advisor  
  
 

Join Date: May 2008
Location: Sydney, Australia
Posts: 1,009
It is correct for the first to have an absolute path, and not required for the second parameter (which is just the name assigned to the attachment), but it looks to me like it's missing a slash before the absolute path?
  #5 (permalink)  
Old 07-07-2008
adzuanamir adzuanamir is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 40
Hi guys..i just got updated ...

The uuencode file1 file1 command actually will attach a file in code. Meaning the attachment can be read only in same OS platform.

In my case, i need to detach the uuencode file1 file1 from solaris to my notebook in window.

I think thats the reason why my attachment is scrumbled when open by wordpad or context.

So does anyone know how to attach simple log or txt file to mailx without using uuencode command??
  #6 (permalink)  
Old 07-08-2008
adzuanamir adzuanamir is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 40
Hi All..

Is mutt -a avilable in solaris mailx?? Sorry to post here
  #7 (permalink)  
Old 07-08-2008
Annihilannic Annihilannic is offline Forum Advisor  
  
 

Join Date: May 2008
Location: Sydney, Australia
Posts: 1,009
Quote:
Originally Posted by adzuanamir View Post
The uuencode file1 file1 command actually will attach a file in code. Meaning the attachment can be read only in same OS platform.
That is not true. If the original file is a plain text file you should be able to open it on any platform that uses the same or similar character sets (e.g. Solaris and Windows) using an email reader that is capable of understanding uuencoded attachments, which should be nearly all of them.

If it was a binary file, such as an executable, then the statement would be partly true... you could look at the contents, but you wouldn't be able to run it.

Quote:
So does anyone know how to attach simple log or txt file to mailx without using uuencode command??
For it to be considered an attachment by an email programme, I believe it needs to be encoded in some way or another, i.e. UUE or MIME64.

You can of course just include it as the main body of the email by using as stdin to mailx:

Code:
mailx -r oraadm@juwpkl.gov.my -s "Oracle Tspace and Datafile Update" adzuan@nc.com.my < /ek_bkup/alert/tbspace_datafile.log
Closed Thread

Bookmarks

Tags
mailx, mailx attachment, solaris

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:24 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0