I want to replace a line in a file that begins with some text and replace contents within that line. The exact code I'm using is as follows:
Code:
sed -i s/^\$CFG{systems}/\$CFG{systems}=[ qw(TESTING1 TESTING2) ];/ test.response
I keep getting the error
Code:
-bash: syntax error near unexpected token `('
So I'm not sure how to overcome the parenthesis. I've tried escaping them but to no avail.
The entire line I'm trying to replace is:
Code:
"$CFG{systems}=[ qw(clustnode1) ];"
I want it to read as follows:
Code:
$CFG{systems}=[ qw(node1 node2) ];