Where is a reasonable sed?
You need to install gnu-sed, not just the coreutils:

brew install gnu-sed


Then, you have to add the following lines on your .bash_profile:

export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"
export MANPATH="/usr/local/opt/gnu-sed/libexec/gnuman:$MANPATH"


Then your sed version should be the latest:

$ sed --version
sed (GNU sed) 4.2.2
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Jay Fenlason, Tom Lord, Ken Pizzini,
and Paolo Bonzini.
GNU sed home page: &lt;http://www.gnu.org/software/sed/&gt;.
General help using GNU software: &lt;http://www.gnu.org/gethelp/&gt;.
E-mail bug reports to: &lt;bug-sed@gnu.org&gt;.
Be sure to include the word ``sed'' somewhere in the ``Subject:'' field.