KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Having some difficulty in replacing some single/double quoted text with sed and was wondering what's the correct method for these 2 examples to change Memached.ini file contents from [server] server[] = "localhost:11211" to [server] server[] = "localhost:11211" server[] = "localhost:11212" and to change memcache.php file contents for these lines from define('ADMIN_USERNAME','username'); // Admin Username define('ADMIN_PASSWORD','password'); // Admin Password $MEMCACHE_SERVERS[] = 'mymemcache-server1:11211'; // add more as an array $MEMCACHE_SERVERS[] = 'mymemcache-server2:11211'; // add more as an array to define('ADMIN_USERNAME','myusername'); // Admin Username define('ADMIN_PASSWORD','mypassword'); // Admin Password $MEMCACHE_SERVERS[] = 'localhost:11211'; // add more as an array $MEMCACHE_SERVERS[] = 'localhost:11212'; // add more as an array I tried for example sed -i 's/'ADMIN_USERNAME','memcache'/'ADMIN_USERNAME','u'/g' /var/www/html/memcache.php while command runs, memcache.php file isn't changed at all ?
Tags (comma-separated)
Save Edits
Cancel