Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: base64 coding for zsh ?



le 12/09/2006,
Bart Schaefer nous �ivait :
> It's about 50 lines of readably-formatted C code to write a base64
> decoder,

so i'll write my first zsh module. It's added to my todo list. 

> slightly more than that to write the encoder, not counting the
> lookup tables. It could be done in shell script, but it would be very
> slow and probably not worth the effort.

ok, i give this solution away.

> alias enB64="perl -MMIME::Base64 -e 'print encode_base64(shift @ARGV)'"
> alias deB64="perl -MMIME::Base64 -e 'print decode_base64(shift @ARGV)'"

well ... i think perl is quite huge for this problem. I'll use openssl
as temporary hack.

alias B64enc='openssl base64'
alias B64dec='openssl base64 -d'

thanks for help.

regards.

-- 
téléphone : 03.90.24.00.19
courriel  : marc.chantreux@xxxxxxxxxxxxxxxxxx
---------------------------------------



Messages sorted by: Reverse Date, Date, Thread, Author