I am trying to replaced a string in all php files with an empty string and it just seems to be ignoring it all together... No errors, yet nothing is replaced in the files.
could someone tell me what is wrong with this command?
find ./ -type f -name '*.php' -exec sed -i 's/session_save_path\('tcp\:\/\/redis\.domain\.com\:6379\?auth\=secret'\);/ /g' {} \;
\?in a basic regular expression means 'match the previous thing 0 or 1 times', not a literal question mark. (This is a GNU extension to normal BRE syntax)\( \)is a capturing group; not sure if that's intentional or you want to match literal parens.