我已经搜索并没有找到解决方案,如果之前已经回答过这个问题,我很抱歉,我不擅长 shell。
我正在尝试通过 SSH 在所有文件中进行递归搜索和替换。
到目前为止,我有这个:
find . -type f | xargs -d "\n" perl -pi -e 's/$this->helper('catalog/product')->getPriceHtml/$this->getPriceHtml/g'
我正在尝试替换它:
$this->helper('catalog/product')->getPriceHtml
有了这个:
$this->getPriceHtml
但我认为它不起作用,因为斜线和单引号。我试过逃避这些\
但无济于事,有什么想法吗?