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.



Reply via email to