LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-12-2009, 12:55 AM   #1
scofiled83
Member
 
Registered: Nov 2008
Posts: 70

Rep: Reputation: 15
grouping files in a single file


Hello

HP UNIX

I have nearly 30 ".txt" files in unix.
I want to email them to windows environment.
I can attach all of them with "uuencode" option and email.

Instead of attaching all 30 files, is there an easier way ?
If I tar these 30 files, and send a single file, tar will not be opened in windows.

Any other suggestions?
 
Old 06-12-2009, 01:06 AM   #2
ghostdog74
Senior Member
 
Registered: Aug 2006
Posts: 2,697
Blog Entries: 5

Rep: Reputation: 244Reputation: 244Reputation: 244
Quote:
tar will not be opened in windows.
yes it will. use winrar/winzip to open
 
Old 06-12-2009, 01:55 AM   #3
scofiled83
Member
 
Registered: Nov 2008
Posts: 70

Original Poster
Rep: Reputation: 15
I will try

Thanks ghostdog
 
Old 06-12-2009, 02:09 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
As ghostdog said. Eventually you can try the zip command (if installed)
Code:
$ mkdir my_files
$ mv *.txt my_files/
$ zip -r my_files.zip my_files/
this will create a ZIP archive that can be open even if you don't have Winzip/Winrar installed (windows uses pkzip by default, if I remember well).
 
Old 06-12-2009, 02:24 AM   #5
scofiled83
Member
 
Registered: Nov 2008
Posts: 70

Original Poster
Rep: Reputation: 15
thanks

Last edited by scofiled83; 06-12-2009 at 04:28 AM.
 
Old 06-12-2009, 04:28 AM   #6
scofiled83
Member
 
Registered: Nov 2008
Posts: 70

Original Poster
Rep: Reputation: 15
I can send an email like below,for one user.
How can I send it to more than one email accounts.


(echo "Report"; uuencode /opt/space_report.tar ) | mailx -m -s "SPACE REPORT" scofield@yahoo.com
 
Old 06-12-2009, 04:32 AM   #7
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Just add more addresses on the command line. If you have a mailing list stored in a text file (one address per line) you can use a loop:
Code:
while read email
do
  (echo "Report"; uuencode /opt/space_report.tar ) | mailx -m -s "SPACE REPORT" $email
done < mailing_list.txt
 
Old 06-12-2009, 04:48 AM   #8
scofiled83
Member
 
Registered: Nov 2008
Posts: 70

Original Poster
Rep: Reputation: 15
Thanks colucix
nice suggestion
I appreciate that
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging 4 files into a single file sudheerkappala Linux - General 3 10-27-2008 02:07 AM
Building a single .ko file from multiple source files rajesh_b Programming 2 04-01-2007 12:51 PM
Adding Multiple Files In A Single Gz File onacorpuscle Linux - Newbie 3 08-31-2006 03:18 AM
Created spanned zip files from a single file FatOldSun Linux - Software 2 01-11-2006 07:04 AM
Command to combine several files as a single file, etc. satimis *BSD 3 06-10-2004 03:59 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:12 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration