I see no problem in the Sed command which evidently failed. If you run the same command from the Bash prompt, does it work?