Using batch PHP from linux shell I am trying to replace the license number in the configuration file below with another. The configuration line may not always display the same, but it may or may not contain spaces, tabs, etc.
Examples:
$config['license_number'] = "jfur2e2ev9uhuvcfu"; $config['license_number'] ="jfur2e2ev9uhuvcfu"; $config['license_number'] =""; $config['license_number']= "jfur2e2ev9uhuvcfu"; $config[ 'license_number' ] = "jfur2e2ev9uhuvcfu";
The key is to find any line with "license_number" (or any other text) and replace everything between double quotes with the new configuration parameter.
I would like to use sed so that I can recursively view all files. I have tried a positive lookbehind, but I can not determine the text of a fixed length for the search.
source share