perl -p -e 's/\\\n//' < ipf.rules > ipf.rules.new
or
perl -pi -e 's/\\\n//' ipf.rules
(to modify the file in place).
-Antony
On Wednesday 26 February 2003 17:24, Slawek wrote:
> well, this may help somebody else as well....
>
> > Michael T. Davis wrote:
> > > My first attempt went line this:
> > >
> > > sed 's/ \\$//' ipf.rules
> > >
> > > That only removed the trailing backslash. According to the sed man
>
> page,
>
> > > lines of input are normally read in up to the terminating newline
> >
> > character
> >
> > > "...unless there is something left after a `D' function..." So, I
> > > tried using the `D' function:
> > >
> > > sed '/ \\$/D' ipf.rules
> > >
> > > This ended up deleting the entire content of lines with terminating
> > > backslashes.
> > >
> > > I would think this would have been a pretty simple task to implement,
> > > but it's becoming increasingly frustrating. Help!
> >
> > sed -e :a -e '/\\$/N; s/\\\n//; ta'
> >
> > hope this helps,
> > Slawek
*************************************************************************
This e-mail and any attachments may contain confidential or privileged
information. If you are not the intended recipient, please contact the
sender immediately and do not use, store or disclose their contents.
Any views expressed are those of the individual sender and not of Kinetic
Information System Services Limited unless otherwise stated.
www.kinetic.co.uk