Re: different sed behaviour on mac os x and linux
On Nov 10, 3:34 pm, Cyrus Kriticos <cyrus.kriti...@googlemail.com>
wrote:
> MNiegl wrote:
> > Hello everyone,
> > I have a very strange problem using sed. I'm trying to parse a normal
> > text file and one of the things i want to do is remove all lines that
> > contain an arrow (looking like that ->). So I do
> > sed -e '/\-\>/ d' infile > outfile
> > which works perfectly fine on my Mac running Mac OS X 10.4.10 but
> > doesn't do anything under Linux (tried it with both openSuse 10.2 and
> > Scientific Linux SLC 4.4). On the linux machines it's GNU sed v4.1.2.
> > I also tried substituting the arrow, which again didn't do anything,
> > so quite obviously the pattern is not found. Is this due to some
> > discrepancy between the linux and the BSD versions of sed, or some
> > special character differences that I'm not aware of?
> > And does anyone have a suggestion how else to achieve the deletion of
> > the lines under Linux?
>
> remove both \
thanks, that did the trick.
Cheers,
Michael
|