This is to automatically update the status of the environment:
Find the IDENTIFIER1.
Replace 51, 255, 51 with some number (e.g, 0, 0, 0)
Find IDENTIFIER 2.
Replace UP or DOWN with a some value (e.g, UP or DOWN as well)
I know i can us a simple find and replace substitution using SED but it will
be a very long line of code and can be mixed up with all the characters on the line so I though of using the above logic but i dont know how to do it. Appreciate your help.
I'm not sure if you are saying you are already using this, and would like to avoid it, but then I don't really see what would be much simpler than this.
If the replacement values should not be hardcoded, you need to adjust the quoting; single quotes prevent variable expansion, but you can mix single and double quotes freely to protect the parts which need protection and still get variable interpolation where you want it.
That works for the character substitution but didnt work for the number substitutions:
sed -e 's/\(<!-- IDENTIFIER1 -->\)[0-9]*,[0-9]*,[0-9]*/\10,0,0/'