Operating System - HP-UX
1752780 Members
6746 Online
108789 Solutions
New Discussion юеВ

Re: Script for pkunzip with a password

 
SOLVED
Go to solution
Belinda Dermody
Super Advisor

Script for pkunzip with a password

I need a one time fix, I have a vendor who has given me over 600 pkzip files with a password, is there an easy way to to use a script to pass the password in so I do not have to type it in each time. I have tried
the following in a script
for i in *.zip
do
pkunzip -s $i << EOF!

EOF!
done
but it stills ask for the passwd.
6 REPLIES 6
RAC_1
Honored Contributor

Re: Script for pkunzip with a password

pkunzip "fil" < "pass_file"

pass_file contains a password.

Does it work??
There is no substitute to HARDWORK
Belinda Dermody
Super Advisor

Re: Script for pkunzip with a password

I didn't get notified by your response, nope that doesnt work.
RAC_1
Honored Contributor

Re: Script for pkunzip with a password

Is that pkunzip for unix?? I think not. If not, what are the options for pkunzip?? Does it support reading pass from variable/file??

You would be better off, posting it in Window$$ forum.

Anil
There is no substitute to HARDWORK
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Script for pkunzip with a password

If you download and install the unzip utility (which is compatible with pkzip), it has a -P password command-line option.
http://gatekeep.cs.utah.edu/hppd/hpux/Misc/unzip-5.51/

Hopefully, the same encryption (although I suspect "encipher" is the more correct term) algorithm is used; at the very least, it's worth a shot.
If it ain't broke, I can fix that.
Belinda Dermody
Super Advisor

Re: Script for pkunzip with a password

Yes it is pkzip/pkunzip for Unix, I have had it on the HP systems now for 6 years, but I have only been dealing with one file at a time, but a new vendorsent us a lot of archive files and a headache

I will try to download the unzip process
Belinda Dermody
Super Advisor

Re: Script for pkunzip with a password

Unzip did it, once again thanks Clay. That saved a lot of tedious right clicking...