Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 12-04-2012
Registered User
 
Join Date: Sep 2011
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Zipping files

Hi All,

I have a scenario where in am using uuencode to send a txt file as an excel to end users( email attachment).I have 7 different files and these files are sent as emails 7 times...


So my question is, can i not zip all the 7 files at once and attach those files in a single email????

Thanks
Sponsored Links
    #2  
Old 12-04-2012
Yoda's Avatar
Jedi Master
 
Join Date: Jan 2012
Location: Galactic Empire
Posts: 2,308
Thanks: 154
Thanked 738 Times in 710 Posts
Yes, you can:-

Code:
find . -name "*.txt" -print | zip att -@


Code:
uuencode att.zip att.zip | mailx -s "Att" user@domain.com

Sponsored Links
    #3  
Old 12-04-2012
Registered User
 
Join Date: Sep 2011
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks for the prompt reply...can u let me know why did you mention att.zip twice in the below code mentioned..

Code:
uuencode att.zip att.zip | mailx -s "Att" user@domain.com

---------- Post updated at 03:53 PM ---------- Previous update was at 03:53 PM ----------

are they 2 different files??????
    #4  
Old 12-04-2012
Yoda's Avatar
Jedi Master
 
Join Date: Jan 2012
Location: Galactic Empire
Posts: 2,308
Thanks: 154
Thanked 738 Times in 710 Posts
No, they are not different files. Below is the syntax of uuencode

Code:
uuencode <source file> <output file>

source file is the file to be encoded & output file is the encoded file. They can be the same name.
Sponsored Links
    #5  
Old 12-04-2012
Mead Rotor
 
Join Date: Aug 2005
Location: Saskatchewan
Posts: 16,393
Thanks: 492
Thanked 2,536 Times in 2,419 Posts
In other words, 'output file' is the filename that the email gets told to use, which needn't have anything to do with the input name.
Sponsored Links
    #6  
Old 12-05-2012
Registered User
 
Join Date: Sep 2011
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Cool...Thanks...

---------- Post updated 12-05-12 at 04:19 AM ---------- Previous update was 12-04-12 at 04:12 PM ----------

using

Code:
find . -name "*.txt" -print | zip att -@

It is zipping all files in the directory, I have only a specific files to be zipped..Tried a few options but it dint work though..pls help
Sponsored Links
    #7  
Old 12-05-2012
./hari.sh's Avatar
Registered User
 
Join Date: Jul 2007
Posts: 95
Thanks: 5
Thanked 4 Times in 4 Posts
use the file name instead of find command

echo yourfile.txt | zip att -@
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Help with zipping files angshuman Shell Programming and Scripting 6 03-01-2011 10:32 AM
zipping files swathich Shell Programming and Scripting 3 11-07-2010 03:18 AM
Zipping files - Please help me its urgent tvbhkishore UNIX for Dummies Questions & Answers 3 07-12-2010 03:50 AM
Zipping files? trob UNIX for Dummies Questions & Answers 4 04-10-2009 05:10 AM
zipping files shary Shell Programming and Scripting 3 07-21-2008 05:58 AM



All times are GMT -4. The time now is 05:30 PM.