From: Andreas Ericsson Date: Mon, 28 Apr 2008 09:11:15 GMT Subject: Re: [PATCH] rebase--interactive: Replace unportable 'tac' by a sed script. Message-ID: <481594B3.4020608@op5.se> In-Reply-To: <20080428090417.GB16153@sigill.intra.peff.net> Jeff King wrote: > On Mon, Apr 28, 2008 at 09:44:48AM +0200, Johannes Sixt wrote: > >>> + perl -e 'print reverse <>' | \ >> [...] >> + sed -ne '1!G;$p;h' | \ > > Wow, and people complain about perl being unreadable. ;) > Well, the tmtowtdi dogma has its drawbacks. Here's another sed-script that does the exact same thing: sed '1!G;h;$!d' That being said, perl borrows most of its regex notation from sed, so it's not as if perl is easier. This is just the top-end of the scale that things like "sed s/foo/bar/" is at the bottom of ;-) -- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231