sed error "unescaped newline inside substitute pattern"

David Banning david+dated+1237392898.23652b at
Fri Mar 13 09:25:35 PDT 2009

> Don't you have control over this web form??? That's the place
> you should filter your input... The sooner you do the filtering
> the better.
> Anyway, you could also use an intermediate variable that replaces
> all newlines with spaces.
> # a="This
> > is
> > the
> > input
> > from the
> > web server"
> # b=`echo $a`
> # sed "s/foo/$b/"
> foo
> This is the input from the web server
> ^D#
> I hope you won't go that route though... Nikos
Yes - I have control of that - so I could filter out the problem in php. 
The only problem is that I don't know what I am filtering.
If I know exactly what the erroneous characters are I could filter them 
- I have looked at the file in vi but the problematic characters are 
invisible there.

More information about the freebsd-questions mailing list