Modularizing sed command for other OSes