Use sed or awk to find string and modify text following within xml document

Anasiawen

New Member
I am attempting to manipulate an Adobe Reader plist file on OS X to stop auto update checking.This needs to be scripting so I can affect the change on 700+ Macs.I have:\[code\]#!/bin/bashplutil -convert xml1 /Users/username/Library/Preferences/com.adobe.Reader.plist\[/code\]to convert the file for text editing.I found this elsewhere for multi-line search and replace:\[code\]sed -n '1h;1!H;${;g;s/<h2.*</h2>/No title here/g;p;}' sample.php > sample-edited.php;\[/code\]The source file has repetitions of similar data, so I need to find the occurrence after the entry CheckForUpdatesAtStartupHere is a portion of the file:\[code\]<key>AutoUriDetect</key> <array> <integer>0</integer> <true/> </array> <key>CheckForUpdatesAtStartup</key> <array> <integer>0</integer> <true/> </array> <key>CheckGPUAtStartup</key> <array> <integer>0</integer> <false/> </array>\[/code\]So I need to replace the true to false for the CheckForUpdatesAtStartup array.
 
Top