correcting sed syntax errors