Make sed in-place more portable -CM