I need to replace the versionName in a xml file from a shell script using sed.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.sed"
android:versionCode="1"
android:versionName="UNKNOWN VERSION NAME">
I've gotten so far as to search for a line containing versionName but how to tell sed to replace everything within the double quotes coming directly after versionName?
sed -i .old '/versionName/ s/WHAT TO WRITE?/NEW VERSION NAME/' AndroidManifest.xml