I am trying to replace the value of following node using sed command.<KeyValue key=EMPTY_SEARCH_CRITERIA type=String value=CS_CODE comment=Configured empty search criteria./>I am using wildcard since initial value could contain any string value. For eg.sed -e 's/value=.*/value=SN_CODE,CS_ID comment=Configured empty search criteria.\/\>/g' CMS_conf.xml > tempfile         ^        ^                                                                     ^But then, in this case, I have to include the comment attribute too.Is there any way I can accomplish this without entering comment attribute?
How to match and replace an attribute value inside a tag
shell script;text processing;sed;regular expression