sed -e 's/cluster_name: 'Test Cluster'/cluster_name: 'Test Cluster1'/'
I have this error message:
sed: -e expression, char 20: unterminated `s' command
Please, how can i correct the sed command ?
sed
sed -e 's/cluster_name: 'Test Cluster'/cluster_name: 'Test Cluster1'/'
I have this error message:
sed: -e expression, char 20: unterminated `s' command
Please, how can i correct the sed command ?
Best Answer
or
The one with all single quotes was more difficult to construct without this program to help, If you want some help getting the command correct, there is a C program you can use
I am testing from cygwin, but any *nix shell should be the same
You see this works
Whereas if you try the one from suspectus
You can use the program to find the fault in it
His one doesn't even execute
Because it has a missing single quote
among perhaps other problems.
And if you look at suspectus's one, it fails even near the beginning, it breaks on the space
This one works
When you put it together you can try adding a space and a character, and then you see whether your quote mode is on or off. If it's off then if you want to escape a single quote then use \' If it's on then turn it off with ' then do \' If you lose track wther it's on or off then add a space, see if it makes a new parameter or not.