Subject: Re: [PATCH] rebase--interactive: Replace unportable 'tac' by a sed script.

From: Andreas Ericsson <[email-masked]>
Date: Mon, 28 Apr 2008 11:11:15 +0200

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                   [email-masked]
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231