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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux