Score:0

sed replace is not replacing anything

me flag
sed -i 's/#DirectoryIndex index.html/#DirectoryIndex index.php /etc/httpd/conf/httpd.conf'

which gives out the error

sed: -e expression #1, char 57: unknown option to `s'

I am trying to replace index.html with index.php

Score:2
in flag

You need to close the string before the filename. And you missed the closing /.

sed -i 's/#DirectoryIndex index.html/#DirectoryIndex index.php/' /etc/httpd/conf/httpd.conf
in flag
Note that the replace will not make much difference since the line is commented out.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.