I'm writing a command-line tool that other developers will run. I'd like to extract the bundle id of the app from their Info.plist file. I can read the plist using something like PlistBuddy or Python's plistlib but I don't know how to reliably extract the $PRODUCT_NAME variable. How can I do this from a shell script?