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

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -