Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Nov 2011 18:59:21 +0000
From:      krad <kraduk@gmail.com>
To:        Vincent Hoffman <vince@unsane.co.uk>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: sed vs gnu sed
Message-ID:  <CALfReyfuW7wrFkFooqX1GHZYscKS9kvzpMmxpu6_xuXG93TzGA@mail.gmail.com>
In-Reply-To: <4EBBA868.5030000@unsane.co.uk>
References:  <4EBA5646.5030102@unsane.co.uk> <4ebb7681.kE6yc4aqdzf2C9LV%perryh@pluto.rain.com> <4EBBA868.5030000@unsane.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On 10 November 2011 10:33, Vincent Hoffman <vince@unsane.co.uk> wrote:

> On 10/11/2011 07:00, perryh@pluto.rain.com wrote:
>
>> Vincent Hoffman<vince@unsane.co.uk>  wrote:
>>
>>  bsd sed (correctly according to SUS at least, I believe[1])
>>> appends a newline when writing to standard out, gnu sed doesnt.
>>>
>> The wonderful thing about standards is that there are so many to
>> choose from  -- Tanenbaum
>>
>>  is there any easy way to make our sed do the same as gnu sed here?
>>>
>> As long as it is OK to remove _all_ newlines -- which seems to be
>> the case here -- you could pipe the output through tr -d '\012'
>>
>
>
> Thanks to all for suggestions, I'll move to using tr at some point i think
> but the overhead of any of the approaches is pretty negligable (except for
> firing up python/perl ;)
>
> Vince
>
>
>  ______________________________**_________________
>> freebsd-questions@freebsd.org mailing list
>> http://lists.freebsd.org/**mailman/listinfo/freebsd-**questions<http://lists.freebsd.org/mailman/listinfo/freebsd-questions>;
>> To unsubscribe, send any mail to "freebsd-questions-**
>> unsubscribe@freebsd.org <freebsd-questions-unsubscribe@freebsd.org>"
>>
>
> ______________________________**_________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/**mailman/listinfo/freebsd-**questions<http://lists.freebsd.org/mailman/listinfo/freebsd-questions>;
> To unsubscribe, send any mail to "freebsd-questions-**
> unsubscribe@freebsd.org <freebsd-questions-unsubscribe@freebsd.org>"
>


you could sidestep the issue entirely /usr/ports/textproc/gsed



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALfReyfuW7wrFkFooqX1GHZYscKS9kvzpMmxpu6_xuXG93TzGA>