From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21032 invoked from network); 13 Sep 2006 01:27:53 -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 01:27:53 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 41473 invoked from network); 13 Sep 2006 01:27:46 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 13 Sep 2006 01:27:46 -0000 Received: (qmail 11084 invoked by alias); 13 Sep 2006 01:27:38 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10710 Received: (qmail 11074 invoked from network); 13 Sep 2006 01:27:37 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 13 Sep 2006 01:27:37 -0000 Received: (qmail 40310 invoked from network); 13 Sep 2006 01:27:37 -0000 Received: from vms042pub.verizon.net (206.46.252.42) by a.mx.sunsite.dk with SMTP; 13 Sep 2006 01:27:36 -0000 Received: from torch.brasslantern.com ([71.116.118.106]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0J5I004DHC1JIAH7@vms042.mailsrvcs.net> for zsh-users@sunsite.dk; Tue, 12 Sep 2006 20:27:20 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id k8D1RJ8p024286 for ; Tue, 12 Sep 2006 18:27:19 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id k8D1RISg024285 for zsh-users@sunsite.dk; Tue, 12 Sep 2006 18:27:18 -0700 Date: Tue, 12 Sep 2006 18:27:18 -0700 From: Bart Schaefer Subject: Re: base64 coding for zsh ? In-reply-to: <20060912150813.GA4937@ulpmm.u-strasbg.fr> To: zsh-users Message-id: <060912182718.ZM24284@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <20060912150813.GA4937@ulpmm.u-strasbg.fr> Comments: In reply to Marc Chantreux "base64 coding for zsh ?" (Sep 12, 5:08pm) On Sep 12, 5:08pm, Marc Chantreux wrote: } } Now i want my function to deal with base64. The fact is, i don't know } how to do it. } } Someone can help ? It's about 50 lines of readably-formatted C code to write a base64 decoder, 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. alias enB64="perl -MMIME::Base64 -e 'print encode_base64(shift @ARGV)'" alias deB64="perl -MMIME::Base64 -e 'print decode_base64(shift @ARGV)'" enB64 abcdef deB64 YWJjZGVm