From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13334 invoked from network); 16 Aug 2005 15:48:03 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 16 Aug 2005 15:48:03 -0000 Received: (qmail 35389 invoked from network); 16 Aug 2005 15:47:55 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 16 Aug 2005 15:47:55 -0000 Received: (qmail 4798 invoked by alias); 16 Aug 2005 15:47:48 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9322 Received: (qmail 4788 invoked from network); 16 Aug 2005 15:47:47 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 16 Aug 2005 15:47:47 -0000 Received: (qmail 34439 invoked from network); 16 Aug 2005 15:47:47 -0000 Received: from ns9.hostinglmi.net (213.194.149.146) by a.mx.sunsite.dk with SMTP; 16 Aug 2005 15:47:42 -0000 Received: from 212.red-80-35-44.pooles.rima-tde.net ([80.35.44.212] helo=localhost) by ns9.hostinglmi.net with esmtpa (Exim 4.51) id 1E53fE-0007NR-UE for zsh-users@sunsite.dk; Tue, 16 Aug 2005 17:47:45 +0200 Date: Tue, 16 Aug 2005 17:51:14 +0200 From: DervishD To: Zsh Users Subject: Re: Replacing sed for zsh portability Message-ID: <20050816155114.GA1854@DervishD> Mail-Followup-To: Zsh Users References: <20050815103557.GA1411@DervishD> <20050816154033.GY10992@ay.vinc17.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20050816154033.GY10992@ay.vinc17.org> User-Agent: Mutt/1.4.2.1i Organization: DervishD X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ns9.hostinglmi.net X-AntiAbuse: Original Domain - sunsite.dk X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - dervishd.net X-Source: X-Source-Args: X-Source-Dir: X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,ITS_LEGAL autolearn=no version=3.0.4 Hi Vincent :) * Vincent Lefevre dixit: > On 2005-08-15 12:35:57 +0200, DervishD wrote: > > Since I cannot use sed for the entire work unless I complicate > > the script (doing multiple substitutions and the like), I want to get > > rid of the current script and doing all the job in ZSH. It doesn't > > matter if it is very slow, speed here is not an issue. > For things related to regexp, it would probably be much easier with Perl. The thing is perfectly suitable to be done in sed, in fact it is a one-liner (three lines if non-GNU sed), and it can even be done in one or two lines in Zsh. Introducing a dependency with Perl just for that... no. Moreover, I don't think that *anything* is easier with Perl. I have a theory: if you just hit your keyboard randomly at your favourite editor, chances are that the noise produced are a perfectly legal (although non functional) Perl script. And Perl-6... well. For regexes I prefer sed, or awk sometimes, although I must confess that since I use zsh my needs for using sed or awk have dropped dramatically. Thanks anyway, Vincent :), but the problem is not complex enough to need Perl for being solved. Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 | http://www.dervishd.net http://www.pleyades.net & http://www.gotesdelluna.net It's my PC and I'll cry if I want to...