I want to replace a function with another function inside all php files. Below is how far i reached:
find ./ -type f -name "*.php" -exec sed -i s/check_perm(\'venA\')/check_perm(\'venA:venB\')/` {} \;
But gave me an error:
sed: -e expression #1, char 1: unknown command: `.'
I want to replace check_perm('venA')
with check_perm('venA:venB')
The following worked for me
find ./ -type f -name "*.php" -exec sed -i "s/check_perm('venA')/check_perm('venA:venB')/g" {} \;
tested with GNU sed version 4.2.1
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.