Add data to XML element within bash script -


i have following xml :

<remote host="${jboss.domain.master.address:127.0.0.1}"     port="${jboss.domain.master.port:9999}"  security-realm="managementrealm" /> 

i want add username=admin line block. whats best way of going this. have tried every sed combination , have been getting nowehere...

recommend against it, but:

xml=$( sed 's# /># username="admin"&#' <<< "$xml" ) 

Comments

Popular posts from this blog

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -