0
我想运行一个脚本来替换很多.php文件中的一段代码。我需要更换:转义SED命令
`popupOpen(\'/home/open.php?c='.urlencode($row['id']).'&s=\', 650, 600)`
与此:
`popupOpen(\'/home/open.php?c='.urlencode($row['id']).'&s=\', 1024, 750)`
我使用的命令是:
find . -name "index.php" -print | xargs sed -i "s/popupOpen(\\\'\/home\/open.php?c='.urlencode\($row\['id']\).'\&s=\\\', 650, 600)/popupOpen(\\\'\/home\/open.php?c='.urlencode\($row\['id']\).'\&s=\\\', 1024, 750)/g"
我只是不能似乎正确地逃避它。我错过了什么?
你说的文件很多,但你只是寻找'index.php' –
我将在哪里运行该命令,每个文件夹都带有index.php约120个文件夹。 – Sean
它在我看来只需要用1024和600替换650用750 – poiu2000