From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8745 invoked from network); 13 Sep 2006 15:08:40 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.5 (2006-08-29) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 13 Sep 2006 15:08:40 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 44929 invoked from network); 13 Sep 2006 15:08:31 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 13 Sep 2006 15:08:31 -0000 Received: (qmail 26916 invoked by alias); 13 Sep 2006 15:08:22 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10711 Received: (qmail 26906 invoked from network); 13 Sep 2006 15:08:21 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 13 Sep 2006 15:08:21 -0000 Received: (qmail 43718 invoked from network); 13 Sep 2006 15:08:20 -0000 Received: from mailhost.u-strasbg.fr (130.79.200.156) by a.mx.sunsite.dk with SMTP; 13 Sep 2006 15:08:16 -0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.13.6/jtpda-5.5pre1) with ESMTP id k8DF8FLG022240 for ; Wed, 13 Sep 2006 17:08:15 +0200 (CEST) Received: from xpeerience.u-strasbg.fr (xpeerience.u-strasbg.fr [130.79.188.35]) by baal.u-strasbg.fr (8.13.7/jtpda-5.5pre1) with ESMTP id k8DF8EqH095346 for ; Wed, 13 Sep 2006 17:08:15 +0200 (CEST) Received: by xpeerience.u-strasbg.fr (Postfix, from userid 1000) id A2FDAD2C8C; Wed, 13 Sep 2006 17:08:18 +0200 (CEST) Date: Wed, 13 Sep 2006 17:08:18 +0200 From: Marc Chantreux To: zsh-users Subject: Re: base64 coding for zsh ? Message-ID: <20060913150818.GA9450@ulpmm.u-strasbg.fr> Mail-Followup-To: zsh-users References: <20060912150813.GA4937@ulpmm.u-strasbg.fr> <060912182718.ZM24284@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <060912182718.ZM24284@torch.brasslantern.com> User-Agent: Mutt/1.5.13 (2006-08-11) Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (mailhost.u-strasbg.fr [IPv6:2001:660:2402::156]); Wed, 13 Sep 2006 17:08:15 +0200 (CEST) X-Virus-Scanned: ClamAV 0.88.4/1875/Wed Sep 13 11:19:58 2006 on mr6.u-strasbg.fr X-Virus-Status: Clean le 12/09/2006, Bart Schaefer nous =E9crivait : > 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.=20 > 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=3D"perl -MMIME::Base64 -e 'print encode_base64(shift @ARGV)= '" > alias deB64=3D"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=3D'openssl base64' alias B64dec=3D'openssl base64 -d' thanks for help. regards. --=20 t=C3=A9l=C3=A9phone : 03.90.24.00.19 courriel : marc.chantreux@ulpmm.u-strasbg.fr ---------------------------------------