fix sed command for bsd system