It seems to be PlistBuddyoutputting as follows:
Array {
ABCD.com.bus.NoEntitlements
ABCD.com.bus.sharing
}
That is a few lines. If you want to go to the elements Array, first you need to cut off the first and last lines:
/usr/libexec/PlistBuddy | sed -e 1d -e '$d'
Then, to read this into a Bash array, you need to surround the sub-net with $(...)another (...), for example:
declare -a val=($(/usr/libexec/PlistBuddy | sed -e 1d -e '$d'))
After that, you can access the first value with ${val[0]}, and the second value with ${val[1]}.
source
share