fork download
  1. #!/bin/bash
  2.  
  3. echo "\$conf['sql']['hostspec'] = 'localhost';" | sed 's/\$conf\['\''sql'\''\]\['\''hostspec'\''\] = '\''localhost'\'';/$conf['\''sql'\'']['\''hostspec'\''] = '\''database.contoso.com'\'';/'
  4.  
  5. echo "\$conf['sql']['hostspec'] = 'localhost';" |
  6. sed 's/\(\$conf\['\''sql'\''\]\['\''hostspec'\''\] = '\''\)[^'\'']*'\'';/\1database.contoso.com'\'';/'
Success #stdin #stdout 0.01s 5436KB
stdin
Standard input is empty
stdout
$conf['sql']['hostspec'] = 'database.contoso.com';
$conf['sql']['hostspec'] = 'database.contoso.com';