handling gnu-sed vs osx sed