Creating word document (.doc) with attachment in unix solaris | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


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

Creating word document (.doc) with attachment in unix solaris

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-13-2012
ajay547 ajay547 is offline
Registered User
 
Join Date: Feb 2010
Last Activity: 13 March 2012, 12:40 PM EDT
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
Creating word document (.doc) with attachment in unix solaris

Hi All,

Is it possible to creation a word document (.doc) in unix solaris which includes an attachment (i.e similar to insert -> object add attachment in windows)

Requirement is to add files into .doc and the files is present in unix servers.
Is it possible to do this within unix instead of downloading the files and manully attaching them?

Regards
Ajay
The Following User Says Thank You to ajay547 For This Useful Post:
Madhur Bhatnaga (10-03-2012)
Sponsored Links
    #2  
Old 03-13-2012
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
 
Join Date: Sep 2005
Last Activity: 31 July 2014, 12:14 PM EDT
Location: Switzerland - GE
Posts: 5,609
Thanks: 151
Thanked 387 Times in 364 Posts
Why?
Do you have MS OFFICE for unix?
Sponsored Links
    #3  
Old 03-13-2012
ajay547 ajay547 is offline
Registered User
 
Join Date: Feb 2010
Last Activity: 13 March 2012, 12:40 PM EDT
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
Its solarix sparc machine. so i assume i cannot use, since i directly login to command line and have no GUI console. Is there any other alternative?
    #4  
Old 03-13-2012
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
 
Join Date: Sep 2005
Last Activity: 31 July 2014, 12:14 PM EDT
Location: Switzerland - GE
Posts: 5,609
Thanks: 151
Thanked 387 Times in 364 Posts
to generate a true .doc you need word...

Maybe shoud you explain what you wish to do, and what tools you have, so far we know you are on a sparc architecture using solaris (version??), what mailer system?
Because if your question summarized is: Can we send attachments in mails using unix, the answer is YES... but as you say, you have no GUI, so it will be command line... and here it gets tricky so the best is to write a shell script...

Last edited by vbe; 03-13-2012 at 01:10 PM.. Reason: typos
Sponsored Links
    #5  
Old 03-13-2012
ajay547 ajay547 is offline
Registered User
 
Join Date: Feb 2010
Last Activity: 13 March 2012, 12:40 PM EDT
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
Hi,

To be frank have no tools, its Sparc OS 5.10 version of solaris.
I need to Insert a file into .doc in windows ( Insert -> Object and then select the file and create the object within the .doc )
However the files which are inserted into .doc are files that i ftp to windows from Unix using filezilla.

Since there are quiet large no of files, i tried to create a .doc in shell
uuencode $FILE $FILE > sample.doc
Then i used mailx to send the file directly to me
uuencode sample.doc sample.doc | mailx <mail-id>

I received the sample.doc attachment in my mail, however was unable to open it.
I am expecting the attachment in the mail to be .doc and within .doc there must be a file i redirected to sample.doc
Sponsored Links
    #6  
Old 03-13-2012
methyl methyl is offline Forum Advisor  
Advisor
 
Join Date: Mar 2008
Last Activity: 18 April 2014, 5:13 AM EDT
Posts: 6,396
Thanks: 287
Thanked 672 Times in 642 Posts
Windows style File Extensions have no special meaning in unix. Changing the name of a file does not change the internal format of the file in unix or Windows. i.e. Just naming a file ".doc" does not make it a Microsoft Word Document. Nor does naming a file ".docx" make it a moderm Microsoft Word Document.

A Microsoft Word format file is not a normal text file and the format is much too complex to process in unix Shell. Suggest you pursue this query with Microsoft.

Last edited by methyl; 03-13-2012 at 01:10 PM..
Sponsored Links
Closed Thread

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
copy contents of unix file to Word document jakSun8 Shell Programming and Scripting 2 05-26-2011 01:39 PM
Grep MS Word document mkris Shell Programming and Scripting 5 11-06-2008 12:02 PM
transfer word document using ftp,sftp artikulkarni UNIX for Dummies Questions & Answers 3 02-17-2008 06:10 PM
How to download an attachment of a document krishprasad Shell Programming and Scripting 2 01-25-2008 01:59 AM
How to conver a unix output file to Microsoft word document divyacl UNIX for Dummies Questions & Answers 1 02-02-2007 04:11 AM



All times are GMT -4. The time now is 11:55 AM.