Search This Blog

sed: replace string between two matching patterns

# settings.xml
# <settings><token>xxx</token></settings>

cat settings.xml | sed -e "s|<token>.*</token>|<token>yyy</token>|g"

# <settings><token>yyy</token></settings>



see also

No comments:

Post a Comment