Macでsedを使う

デフォルトのsedはエラーを吐くのでgnu-sed(gsed)を使うらしい。
http://www.absolute-keitarou.net/blog/?p=586

$ brew install gnu-sed

alias sed="gsed"
しておいた。