T
T
TazManiak2018-03-16 12:09:55
Regular Expressions
TazManiak, 2018-03-16 12:09:55

How to replace a line in a file?

Good afternoon ! could you tell me how to replace the line $config['create_default_folders'] = true; in the file to the line $config['create_default_folders'] = false;
I tried everything I knew :) it doesn't work

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Mirilaczvili, 2018-03-17
@2ord

You need to escape special characters for it to work.
\$config\[\'create_default_folders\'\] = true\;
sed 's/\$config\['create_default_folders'\] \= true;/\$config\['create_default_folders'\] \= false;/'
www.regex-escape.com/regex-escape.php?s =%24config%...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question