I have this text in this file:
test.php
$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'original',
'username' => 'root',
'password' => 'root',
'host' => 'localhost'
),
),
);
In terminal run this line to replace 'original' with 'new'
sed -i 's/original/new/g' test.php
UPDATE: The error message is:
sed: 1: "test.php": undefined label 'est.php'
What is the problem?
UPDATE 2:
If I just run: ( I removed '-i')
sed 's/original/new/g' test.php
I see the file text modified in the terminal. But then the file is not saved.