Use gsed if it's present. On Mac OS X the sed is more primitive