[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how does one redirect the input for a terminal ?



Quoting Jan Pfeifer (janpf@iname.com):
> 
> I'm trying to compress with passwords a couple of hundred files using
> "zip" (I have to use this, as some of the compressed files will go to
> windoze users), but "zip" only seems to take the password from a
> terminal, so I can't use the "<" redirector of bash. Is there a way of
> fooling it, so it reads from a file, believing it to be a terminal ?
> Or any other way round ?

Don't bother? Just compress twice for one password prompt:

zip unprotected.zip list of hundreds of files...

zip -e protected.zip unprotected.zip

Cheers,

-- 
Email:  d.wright@open.ac.uk   Tel: +44 1908 653 739  Fax: +44 1908 655 151
Snail:  David Wright, Earth Science Dept., Milton Keynes, England, MK7 6AA
Disclaimer:   These addresses are only for reaching me, and do not signify
official stationery. Views expressed here are either my own or plagiarised.



Reply to: