Any array from your command will return an array of the form -
Array {
1
2
}
sed will delete the first and last line, so with this -
declare -a FILE_ARRAY =($(/usr/libexec/PlistBuddy -c "print :'public-headers'" $PLIST_PATH | sed -e 1d -e '$d'))
you get 1 2which you declare as an array inFILE_ARRAY
which you can access - ${FILE_ARRAY[1]}
The length of such an array will be - echo ${#FILE_ARRAY[@]}
Response source
source
share