My linux is rusty at best, but I thought the pattern re-placer would allow pipebars as delimiters?
The error itself is definitely not a PHP error though, so its the usage of SED that's causing that. I'll move this to the computer programming forum instead.