1834157 Members
2258 Online
110064 Solutions
New Discussion

Re: file conversion

 
harikrishna
Advisor

file conversion

Is there any command in HP-ux servers to convert .csv file to .doc file.
8 REPLIES 8
Massimo Bianchi
Honored Contributor

Re: file conversion

Hi,
NO, i think there is no such utility, since a csv is a Comma Separated Value text file, whereas a .doc is a microsoft proprietary format for storing the documents.

If you tell us the purpose, maybe we can suggest other ideas, like generating html files or pdf files.

html could be an option ?

Massimo
Mark Grant
Honored Contributor

Re: file conversion

You might find a way by using star office but youll have to buy that as I don't belive there is a port of openofficefor HPUX. It could all get a bit horrible though and Massimo's suggestion of converting to html first seems to me to be the best idea.
Never preceed any demonstration with anything more predictive than "watch this"
harikrishna
Advisor

Re: file conversion

hi,
thanks for giving the reply.actually my need is to send the .csv file using mailx command as an attahment.for this i am using
uuencode.
is there any command to foramt the .csv like adjust -m1,which removes all spaces and treat all as words.

Once again thanks for giving the reply.
Massimo Bianchi
Honored Contributor

Re: file conversion

mmhh... removing formatting from the file, or removing spaces , or collapsing the spaces ?


remove formatting:

cat yourfile | col -b | uuencode .....

remove/collapse spaces:

cat yourfile | tr -d " " | uuencode ....

HTH,
Massimo
harikrishna
Advisor

Re: file conversion

THANKS FOR GIVING THE SOLUTION,one more question i want know
I WANT TO DO FTP TO ANTOTHER SYSTEM HOW CAN I PASS USER NAME AND PASSWORD TO THAT IN A SHELL SCRIPT
Massimo Bianchi
Honored Contributor

Re: file conversion

create an ftp script, like the following:


ftp -in HOSTNAME << EOF
user USERNAME PASSWORD

...
by
EOF



Massimo


Hoefnix
Honored Contributor

Re: file conversion

you can also use a .netrc file
see manpage of .netrc

Then you are able to use ftp "hostname" in your script and the .netrc will do the login and file transfer.

Regards,

Peter Geluk
harikrishna
Advisor

Re: file conversion

Thanks for giving the reply