[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Demexp-dev] Depencies of ocaml-gettext and other problems
From: |
GISQUET Christophe |
Subject: |
Re: [Demexp-dev] Depencies of ocaml-gettext and other problems |
Date: |
Sat, 23 Sep 2006 23:49:05 +0200 |
User-agent: |
Thunderbird 1.5.0.7 (Windows/20060909) |
Good evening,
David MENTRE a écrit :
When I fall short of Navy commandos for breakfast, I usually have sed
scripts instead:
sed ':a; /^#:/N; s/\n#://; ta' <file>
Ouch, quite impressive! Patch applied but some explanation would be
nice. :-)
I was in no shape at the time of the initial posting anyway.
If I understood correctly:
- put label "a";
- for each line starting with "#:", add them to the "pattern space";
- remove each pattern "\n#:";
- branch to label "a" if previous substitution is successful.
Am I correct?
I have the same analysis. Of course, unmatching lines don't go through that
pipeline.
To tell you the truth, it didn't miraculously end up my brain, but through
repetitive head-banging against the well-known and nice sed FAQ:
http://www.dbnet.ece.ntua.gr/~george/sed/OLD/sedfaq.html
I hardly ever use labels, and I guess next time it will be of use, I'll
probably have forgotten about them. There are so many ways to performs tasks
using sed.
Best regards,
--
Christophe GISQUET
- [Demexp-dev] Depencies of ocaml-gettext and other problems, GISQUET Christophe, 2006/09/02
- Re: [Demexp-dev] Depencies of ocaml-gettext and other problems, David MENTRE, 2006/09/23
- Re: [Demexp-dev] Depencies of ocaml-gettext and other problems, GISQUET Christophe, 2006/09/23
- Re: [Demexp-dev] Depencies of ocaml-gettext and other problems, David MENTRE, 2006/09/24
- Re: [Demexp-dev] Depencies of ocaml-gettext and other problems, GISQUET Christophe, 2006/09/24
- win32 and GTK (was: Re: [Demexp-dev] Depencies of ocaml-gettext and other problems), David MENTRE, 2006/09/24
- [Demexp-dev] Re: win32 and GTK, GISQUET Christophe, 2006/09/24
- Re: [Demexp-dev] Re: win32 and GTK, GISQUET Christophe, 2006/09/25
- Re: [Demexp-dev] Re: win32 and GTK, David MENTRE, 2006/09/26
- Re: [Demexp-dev] Re: win32 and GTK, GISQUET Christophe, 2006/09/26