my config file has this
<IfModule mod_dir.c>
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
</IfModule>
I want to change index.php
to index.temp
I created this
sed -i -e '/s/index.php/index.temp/‘ dir.conf
It makes this,
<IfModule mod_dir.c>
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
</IfModule>
ndex.php/index.temp/
s
substitute command, so do not begin with/
as/s/
means match the patterns
, and then the command isi
which inserts the rest of the line. So usesed -i -e 's/index.php/index.temp/'
– meuh Nov 03 '18 at 20:06