sed vs gnu sed

perryh at perryh at
Thu Nov 10 00:52:20 UTC 2011

Vincent Hoffman <vince at> 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'

More information about the freebsd-questions mailing list