user2650277
user2650277

Reputation: 6749

sed command not working in my bash script

I am trying to modify php.ini with sed commands but its not working for some reason

sed -i 's/disable_functions = /disable_functions = system, show_source, symlink, dl, shell_exec, passthru,escapeshellarg,escapeshellcmd/g' /etc/php.ini

The disable_functions line looks like this in php.ini

disable_functions =

Can you tell what is wrong

Upvotes: 1

Views: 146

Answers (1)

nu11p01n73R
nu11p01n73R

Reputation: 26677

The problem is that in /etc/php.ini there is no space after the =

So remove the space after = from sed as

$ sed -i 's/disable_functions =/disable_functions = system, show_source, symlink, dl, shell_exec, passthru,escapeshellarg,escapeshellcmd/g' 

Upvotes: 1

Related Questions