[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] Line continuation
From: |
Ralph Corderoy |
Subject: |
Re: [Groff] Line continuation |
Date: |
Sun, 26 Oct 2008 11:27:38 +0000 |
Hi Miklos,
> > $ sed ':l;/--$/{N;s/--\n *//;b l}' <miklos
>
> Since I need to do this thing far too many times, your idea of a
> preprocessor seems just great. I don't know about sed but wrote a few
> scripts in perl (or Perl?), so this would be an easy job.
Well, the sed script is simple enough. If you do write your own in
Perl, look out for dealing with a string of continued lines, and also
handle a continuation at the end of the file. My test file in the
earlier email had both.
To change the sed script to treat a backslash at the end of the line as
the continuation marker, you just need to be aware that it needs
escaping with another, like Perl.
sed ':l;/\\$/{N;s/\\\n *//;b l}'
Cheers,
Ralph.
- [Groff] Line continuation, Miklos Somogyi, 2008/10/25
- Re: [Groff] Line continuation, Larry Kollar, 2008/10/25
- Re: [Groff] Line continuation, Ralph Corderoy, 2008/10/26
- Re: [Groff] Line continuation, Miklos Somogyi, 2008/10/26
- Re: [Groff] Line continuation,
Ralph Corderoy <=
- Re: [Groff] Line continuation, Keith Marshall, 2008/10/26
- Re: [Groff] Line continuation, Miklos Somogyi, 2008/10/26
- Re: [Groff] Line continuation, Clarke Echols, 2008/10/26
- Re: [Groff] Line continuation, Miklos Somogyi, 2008/10/27
- Re: [Groff] Line continuation, walter harms, 2008/10/27
- Re: [Groff] Line continuation, Clarke Echols, 2008/10/27