I have a doubt in sed, i want to add some parameter at the end of the tag inside a xml tag. how to i do that. so i want to add Results="true" value="high" inside the xml tag.
This does not changes the things inside the xml file permanently. It just print the changes in the Command line. What changes should i make.I am enclosing my script below, when i pass the xml file to be modified from the command line.
#!/bin/sh
usage() {
$ECHO "Usage: [not perfect]"
}
if [ $# -eq 0 ]; then
usage
exit 0
fi
cat $1 | grep "execute description=" | sed 's/>/ Results="true" value="h
igh">/'
if [ $# -ne 1 ];
then
usage
exit 1
fi