I am using sed command to insert an xml element into the existing xml file.
I have xml file as
change this:
CONTENT=" NewName NewID "
to this:
CONTENT="\nNewName\nNewID\n"
and then:
C=$(echo $CONTENT | sed 's/\//\\\//g') sed "/<\/Students>/ s/.*/${C}\n&/" file